This project providers fundamental product operations.
Running the application in dev mode
You can run Postgres in your local using our docker-compose.yml file in the root folder. See env/local-database.env file for an additional config.
docker-compose up
Then, you can run command as following;
./gradlew bootRun
-
url: ../product | POST
{ "title": "Tablet", "price": "300.00", "memberId": "1" }
{ "productId": 2 }
-
url: ../product | PUT
{ "title": "Tablet", "price": "550.00", "memberId": "1" }
200 (Http Ok)
-
url: ../product | DELETE
{ "productId": "1" }
200 (Http Ok)
-
url: ../products | GET
{ "products": [ { "id": 1, "title": "Tablet", "price": 300.00, "member": { "id": 1, "nickname": "John" } }, { "id": 2, "title": "Phone", "price": 500.00, "member": { "id": 1, "nickname": "John" } } ]
}
You can use this postman collection to simulate http requests and responses
Flyway is a database migration tool also easy to use build database schema