Sample spring boot application connecting to a Postgres DB.
- HTTP server listens on port 8080
- CRUD API exposed at
/customer - Prometheus metrics exposed at
/actuator/prometheus - Liveness and readiness information exposed at
/actuator/health/livenessand/actuator/health/readiness
- Docker
- Build the docker image locally using
./gradlew jibDockerBuild- Start the containers using docker compose
docker-compose up- Use the provided Postman collection to hit the application endpoints
- Alternatively, use the following curl commands
- Create / Update customer
curl --location --request PUT 'localhost:8080/customer/' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "John Smith"
}'- Fetch customer
curl --location --request GET 'localhost:8080/customer/1'- Delete customer
curl --location --request DELETE 'localhost:8080/customer/1'