Optimising your Inner Development Loop with Spring Boot 3.1+ and Docker
summary
Spring Boot 3.1 introduces Development-time Services to auto-manage Docker Compose and Testcontainers lifecycles and remove hardcoded ports; demo shows adding memcached support by implementing ConnectionDetails factories for both Docker Compose and Testcontainers, registering them in spring.factories, and using @ServiceConnection and generic Testcontainers containers. A shopping‑cart app runs against MariaDB and memcached with dynamic ports, unit tests switch between docker‑compose and testcontainers, and CI-friendly Testcontainers setup runs reliably — the live coding produces working containers and removes most manual configuration.
AI-written summary · about
