In this project, We will show how Spring boot and spring data jpa can be used to integrate with postgresql.
git clone https://github.com/RajeshBhojwani/springboot-postgresql.git
gradlew clean build
java -jar java -jar build/libs/springposgres-0.0.1-SNAPSHOT.jar
- Bulk upload of the customers using below api. No need to pass any data.
http://localhost:9090/bulkcreate
- POST call to insert one customer based on the JSON data passed.
{
"firstName": "Sumit",
"lastName": "Khan"
}
- GET call to retrive all customers.
-
GET call to search customer by id. http://localhost:9090/search/{id}
-
GET call to search customer by first name. http://localhost:9090/searchbyfirstname/{firstname}
For detail explanation of this project check this blog -https://www.rajeshbhojwani.co.in/2019/01/spring-boot-and-postgresql.html