Product Detail Application
Tools & Techonlogies Used:
Eclipse
spring boot 2
hibernate 5
Java 8
Postgresql 9.5
Steps to run application:
1. Create database name - ‘ProductDB’
2. change db server details in Application.properties file.
spring.datasource.url = jdbc:postgresql://localhost:5432/ProductDB
spring.datasource.username = postgres
spring.datasource.password = root
3. Application running port : 4001
Screenshot:
1. Product save API:
Url - /api/v1/product
Method – POST
Request Body:
Form -data:
{ “productName” : ”Sixth”,
“color”: “Black”,
“price”:43.3,
“categoryName”: “Hand bag”,
“Attachment”: // select image by setting }
2. Get Products API:
Url - /api/v1/product/all?page=2&limit=5
Method – Get
3. Get Product for 2nd page:
4. Get Product for 3nd page: (total elements in 6 elements and displaying 3rd page which does not
have elements)
Note: Due to time constraint :
1. validations are pending like RequiredFieldValidation for product item.
2. Upload file size validation(not mentioned).
3. File extension validation.