Reputation: 3398
I'm new to Spring MVC, and I have been working on Codeigniter in php for a while, In Codeigniter you implement Controller and Model by extending the particular class,
Ex : class Blogmodel extends CI_Model {
but in Spring MVC I didn't see such an implementation, except for controllers. Please can somebody give me a brief introduction on how would I perform the tasks that I did in a Model class in PHP, using Spring Framework.
Upvotes: 0
Views: 370
Reputation: 64099
Spring MVC is a presentation layer framework. Is it not tied to any persistence mechanism, but can work seamlessly with persistence models.
In Spring (as well as other Java enterprise frameworks) the persistence layer is implemented using JPA (of which Hibernate is an implementation).
Spring MVC can easily operate on the JPA Entities.
Upvotes: 3
Reputation: 21864
You normally don't extend or implement anything, you just create the classes for the models you're interested in having.
If the model is supposed to be persisted somewhere, for instance in a database, you normally annotate the class with @Entity
.
Upvotes: 0