CRUD(Create, Read, Update, Delete) Spring boot with database postgres
docker run -d --name psql
-e POSTGRES_USER=psql
-e POSTGRES_PASSWORD=password
-p 5432:5432
postgres:14
curl --location 'http://localhost:8080/products'
--header 'Content-Type: application/json'
--data '{
"name":"Keyboard",
"qty":25
}'
curl --location 'http://localhost:8080/products/55992d28-b715-403c-98e7-8f266bd5837d'
curl --location --request PUT 'http://localhost:8080/products'
--header 'Content-Type: application/json'
--data '{
"id":"55992d28-b715-403c-98e7-8f266bd5837d",
"name":"Logitech Keyboard",
"qty":25
}'
curl --location 'http://localhost:8080/products'
curl --location --request DELETE 'http://localhost:8080/products/55992d28-b715-403c-98e7-8f266bd5837d'