Template for the simplest Http CRUD Java service
- Java 17
- Docker
- Ensure configs in
/development/config.yml
are relevant for local start up - Run the PostgreSQL:
docker rm -f template-postgres;
docker run --name template-postgres -e POSTGRES_USER=ddl-template -e POSTGRES_PASSWORD=password -e POSTGRES_DB=template -p 5433:5432 postgres:15
- Build and run the app itself
./gradlew clean shadowJar
java -Dconfig.file="file:$(pwd)/development/config.yml" -jar template-app/build/libs/template-app.jar
Example query to test the app:
curl localhost:7000/healthcheck
Swagger docs - http://localhost:7000/swagger-ui/