Adding Spring Data JPA and PostgreSQL dependencies
This section will add Spring Data JPA, PostgreSQL, and other valuable dependencies to our application. We will add the dependencies with Spring Initializr and an existing Spring Boot project.
Adding with Spring Initializr
Adding dependencies after creating a Spring Boot application using Spring Initializr is simple. We only need to select the dependencies on Initializr before generating our project:
- The first thing to do is to go to https://start.spring.io/ or to your IntelliJ IDEA (for Ultimate users) to open Spring Initializr (for a recap of the Using Spring Initializr section, refer to Chapter 3, Moving into Spring Boot).
- Choose your project if it will use Maven or Gradle and set the required configurations, which are Group, Artifact, Name, Description, Package name, Packaging, and the Java version of the project.
- Next, click Add Dependencies at the top right and select the following dependencies:
- Spring Data...