I wrote an article for Baeldung on running a Spring Boot application with the popular open-source database PostgreSQL in Docker Compose.
- We start by creating a Spring Boot application for PostgreSQL.
- Next, we write a Docker Compose file to run our application container with a PostgreSQL container.
- Finally, we create a customer entity and repository, which allows us to save a customer to PostgreSQL.
The article is available here.