In this project, we are dealing with Batch Insert in 3 differrent ways:
- Hibernate (Spring Data JPA)
- JDBC Batch Processing
- JDBC with Multi Threading
- Java
- Spring Boot
- Maven
- Flyway
- PostgreSQL
Configure your database here: application.properties and flyway.conf
- Install dependencies
mvn clean install -DskipTests- Run Database migrations
mvn flyway:migrate- Run the application
mvn spring-boot:run| Method | Endpoint | Request Parameter | Description |
|---|---|---|---|
| POST | /api/product/hibernate | total | Batch insert using JPA |
| POST | /api/product/jdbc | total | Batch insert using JDBC |
| POST | /api/product/jdbc-threading | total | JDBC batch insert with multithreading |
To test API, send the HTTP-request inside client.http file.