$ git clone https://github.com/niteshsinghrajput/CRUD-Spring-Boot-JPA-MySQL.git
File -> Import -> Maven -> Existing Maven Projects -> Browse Project from cloned location
5. Update database credential and other configuration into application.properties available in src/main/java/resources
spring.datasource.url=jdbc:mysql://localhost:3306/bookstore
spring.datasource.username=root
spring.datasource.password=
spring.datasource.tomcat.max-wait=20000
spring.datasource.tomcat.max-active=50
spring.datasource.tomcat.max-idle=20
spring.datasource.tomcat.min-idle=15
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.id.new_generator_mappings = false
spring.jpa.properties.hibernate.format_sql = true
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
can call following Endpoints by using POSTMAN
http://localhost:8080/bookservice/books
http://localhost:8080/bookservice/books
{
"name": "C++",
"author": "Nitesh",
"publication": "Rajput Publication",
"category": "Computer Programming",
"pages": 1500,
"price": 240
}
http://localhost:8080/bookservice/books/<id>
http://localhost:8080/bookservice/books/<id>
{
"name": "C++",
"author": "Nitesh",
"publication": "Rajput Publication",
"category": "Computer Programming",
"pages": 1500,
"price": 240
}
http://localhost:8080/bookservice/books/<id>