CRUD API Using Hibernate
About
Maven Dependencies
<dependencies>
<!-- Spring Boot Starter Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Starter for JPA (includes Hibernate) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- MySQL Connector (or any DB you use) -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Optional: Lombok to reduce boilerplate -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>Application Properties File (Hibernate + DB Settings)
Entity Class
Repository Interface
Service Layer
Controller Layer (REST API)
Main Application Class
Testing the API
Operation
HTTP Method
URL
Body (JSON)
Last updated