img
Figure 16-2. Entering details for a Spring MVC project
Upon completion, STS will create a web project with the required dependencies, including the
Spring MVC module.
Implementing the Service Layer for the Samples
We want to show you some more practical samples instead of a simple "Hello World" application. So, we
will implement a simple contact information service (like the one in previous chapters) using JPA and
then expose its services to remote clients. This section discusses how to implement the service layer.
Adding Required Dependencies for the JPA Backend
We need to add the required dependencies to the project. Table 16-1 shows the dependencies required
for implementing a service layer with JPA 2 and Hibernate as the persistence provider. Also, Spring Data
JPA will be used. In addition, verify that the project is using Spring 3.1.
Table 16-1. Maven Dependencies for Service Layer
Group ID
Artifact ID
Version
Description
org.springframework
spring-jdbc
3.1.0.RELEASE Spring JDBC module.
org.springframework
spring-orm
3.1.0.RELEASE Spring ORM module.
org.springframework
spring-tx
3.1.0.RELEASE Spring transaction support module.
org.springframework.dataspring-data-jpa
1.0.1.RELEASE Spring Data JPA library.
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home