Spring MVC application using JPA

In the previous section, we learned how to create a web application using Spring and JDBC. In this section, we will take a quick look at how to use Spring with JPA (Java Persistence API). We have already learned how to use JPA in Chapter 4, Creating JEE Database Applications, and in Chapter 7, Creating JEE Applications with EJB, so we won't go into detail of how to set up the Eclipse project for JPA. However, we will discuss how to use JPA along with Spring in detail in this section.

We will create a separate project for this example. Create a Spring MVC project as described in the Creating Spring project section of this chapter. On the second page of the project wizard, where you are asked to enter a top-level ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.