Skip to main content

Spring Data JPA

Learn Spring Data JPA (Spring Data JPA, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Spring Data JPA is a part of the larger Spring Data family that makes it easy to work with relational databases in a Spring application. It sits on top of JPA (Java Persistence API) and Hibernate (the most common JPA implementation) and removes almost all of the boilerplate code (DAO classes, SQL statements, ResultSet mapping) that we normally have to write when talking to a database. The two building blocks we start with are: • @Entity - a plain Java class that represents a database table. • Repository interface - an interface that gives us ready-made methods to save, read, update and delete...

More lessons in Spring Data JPA