...
/Getting Started with Spring Data JPA
Getting Started with Spring Data JPA
Learn how to add Spring Data JPA to the application.
We'll cover the following...
We'll cover the following...
Adding Spring Data JPA
To add Spring Data JPA to the project, we need to add the following dependencies to the Maven pom.xml:
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jpa</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-validation</artifactId></dependency><dependency><groupId>io.github.wimdeblauwe</groupId><artifactId>jpearl-core</artifactId><version>${jpearl.version}</version></dependency>
- 
spring-boot-starter-data-jpaincludes the JPA specification and Hibernate.
- 
spring-boot-starter-validationincludes Hibernate Validator which allows to express and validate application constraints.
- 
jpearlis a library with some utility classes and is good to be used with Spring Data JPA.
We will also add this to the project > build > pluginManagement > plugins section of the pom.xml:
<plugin><groupId>io.github.wimdeblauwe</groupId><artifactId>jpearl-maven-plugin</artifactId><version>${jpearl.version}</version><configuration><basePackage>com.tamingthymeleaf.application</basePackage></configuration></plugin>
The JPA Early Primary Key ...