...

/

Configuration and Application Start-Up

Configuration and Application Start-Up

Explore a Spring Boot project with Spring Data JPA dependency and integration with the in-memory H2 database.

To start, we create a Spring Boot 3 project with Java 17 support.

Project structure

We can find a few directories like gradle and src in the project structure.

Press + to interact
The project structure of the Spring Boot project
The project structure of the Spring Boot project

Moreover, a few files, such as build.gradle and settings.gradle, which are specific to the Gradle Build Tool, are also part of the project.

Package structure

Then, we create separate directories in the spring_data application for different types of files:

  • entity: This is the directory for entities.
  • repository: This is the directory for the JPA repository.

Also, the SpringDataApplication class in the src/main/java/com/smartdiscover ...