This is a Spring Boot CRUD application for managing products.
It demonstrates the use of Spring Boot, Hibernate (JPA), and an H2 in-memory database to perform basic operations:
- Create
- Read
- Update
- Delete
- Java 17+
- Spring Boot
- Spring Data JPA (Hibernate)
- H2 Database (in-memory)
- Maven (build tool)
- REST APIs with
@RestController
src/main/java/com/example/firstapp
│── controller
│ ├── HomeController.java
│ ├── LoginController.java
│ └── ProductController.java # Handles CRUD endpoints
│
│── modal
│ └── Product.java # Entity class
│
│── repository
│ └── ProductRepo.java # JPA repository interface
│
│── service
│ └── ProductService.java # Business logic
│
└── FirstAppApplication.java # Main class
-
Clone the repository
git clone https://github.com/Jayaram-dev-004/springboot-crud.git cd springboot-crud -
Build the project
mvn clean install
-
Run the application
mvn spring-boot:run
-
The app will start on:
http://localhost:8080
🗄 Database
H2 Console: http://localhost:8080/h2-console
Default JDBC URL: jdbc:h2:mem:testdb
Username: sa
Password: (empty)