We will create a simple Spring Boot Maven project using the following dependencies:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
spring-boot-starter-data-jpa is the Spring Boot starter project for Spring Data JPA.
Important dependencies that spring-boot-starter-data-jpa brings in are Java Transaction APIs (JTAs), Hibernate Core, and Entity Manager (a default JPA implementation). Some of the other important dependencies are shown in the following screenshot:
We are using H2 as an in-memory database and adding a dependency on spring-boot-starter-test for unit tests.