Architecture: Services layer with Spring
In order to make the service layer and use the dependency injection we will take Spring.
Spring 2.5.6 is the OEPE default version supported.
First we will add the Spring Facet to our project. Right mouse button over the project > Properties… :
After genertate the ORM classes. They will generate with contextual menu > Spring > Generate Spring ORM Classes …
You can see, about the JPA defined in our persistence package, it will create th access classes and services ones. I recommend you see the lebrijo.school.services and lebrijo.school.dao packages.
After we must clean this class of methods, the generator generates all possibilities (remove, persist, findById,…). For example, if one entity of our model is a view, we can destroy persist or remove methods.
Here I keep the zip eclipse project after these steps.
This entry was posted on Sunday, July 18th, 2010 - 7:00 and is filed under spring, Eclipse, Java. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


Have your say
Fields in bold are required. Email addresses are never published or distributed.
Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.
Line breaks and paragraphs are automatically converted.
Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.