This project is a Spring Boot application that provides a RESTful API for managing retail orders, using PostgreSQL as the database.
- Create, retrieve, update, and delete orders.
- Uses PostgreSQL for data persistence.
- Spring Boot Actuator for monitoring and management.
- Comprehensive test suite including unit and integration tests.
- Docker support for easy setup and deployment.
- OpenAPI 3 (Swagger) documentation for API endpoints.
- Java 17
- Spring Boot
- Spring Data JPA
- PostgreSQL
- Maven
- JUnit
- Testcontainers (for integration tests)
- Docker
- Java 17 or higher
- Maven 3.6.0 or higher
- Docker
- PostgreSQL (if you want to run the application outside Docker)
- Clone the repository:
git clone https://github.com/j2eeexpert2015/testcontainers-with-spring-boot-postgres.git
cd testcontainers-with-spring-boot-postgres- Build the application:
mvn clean install- Ensure PostgreSQL is running and accessible.
- Run the Spring Boot application:
docker-compose build
docker-compose up
mvn spring-boot:runhttp://localhost:8080/swagger-ui/index.html- Ensure Docker is installed and running
- Build and run the Docker Compose setup
mvn spring-boot:runThe Testcontainer will start the PostgreSQL database. The Spring Boot application will also attempt to connect to it (you may need to build the Spring Boot application separately or include it in your Docker setup).
mvn testHi, I’m Ayan Dutta, a Software Architect, Instructor, and Content Creator.
I create practical, hands-on courses on Java, Spring Boot, Debugging, Git, Python, and more.
- 💬 Slack Group: Join Here
- 📢 After joining, go to the
#integration-testing-with-testcontainers-java-spring-bootchannel - 📧 Email: j2eeexpert2015@gmail.com
- 🔗 YouTube: LearningFromExperience
- 📝 Medium Blog: @mrayandutta
- 💼 LinkedIn: Ayan Dutta
![]() Eclipse Debugging Techniques |
![]() Java Debugging With IntelliJ |
![]() Java Debugging with VS Code |
![]() IntelliJ IDEA Tips & Tricks |
![]() Creational Design Patterns |
![]() Python Debugging With PyCharm |
![]() Python Debugging with VS Code |
![]() Python Debugging (Free) |
![]() GitHub Desktop Guide |
![]() Git & GitHub with Eclipse |










