Posts

Spring Data Jpa: What's underneath

Image
Spring Data in Spring Boot ( spring-boot-starter-data-jpa ) simplifies data access by abstracting the persistence layer and automatically implementing common repository patterns using JPA (typically Hibernate). This article is my attempt to go through what runs underneath and what boilerplate indeed spring data abstracts way for us. To make things easier I divided the demonstration in 3 parts 1. Make our own Data Access layer the old fashioned way with spring+hibernate. 2. Duplicate the same Data Access layer using spring boot. 3. How they both relate and how spring boot helps.   1. The Spring+Hibernate way The plane spring/hibernate way starts much like spring-boot way, that is with an entity layer.                                                ...