A practical guide on combining Testcontainers and Spring Boot when your application depends on multiple containers simultaneously. It demonstrates using ComposeContainer with a docker-compose file to spin up PostgreSQL, Kafka, and Schema Registry together, then wiring the dynamic ports into Spring's application context via ApplicationContextInitializer and TestPropertyValues.

1m read timeFrom wimdeblauwe.com
Post cover image

Sort: