Efficient Containers with Spring Boot 3, Java 21 and CDS
summary
Migrates a Spring Boot 2.7 / Java 8 PetClinic to Spring Boot 3 / Java 21 and shows concrete knobs: enable Virtual Threads, CDS plus Spring AOT, and use a self-extracting executable jar layout or Buildpacks that automatically perform the CDS training run. Demo builds with Maven/boot build-image and produces a container that boots in about 1s: measured 42% startup reduction overall and up to ~70% when replacing old webjars scanning; memory and warmup also improve and the demo artifacts run successfully.
AI-written summary · about
chapters (11)
- 0:00Introduction and welcome
- 0:42Why runtime efficiency matters
- 3:54Spring Boot 3 efficiency features
- 7:45Native vs CRA vs CDS comparison
- 11:20Recommendations for optimization
- 13:07Demo: Executable JAR extraction
- 14:33Demo: Buildpacks and CDS
- 15:35Optimizing Pet Clinic step-by-step
- 22:45Performance benchmarks
- 26:19Future: Project Leyden
- 27:25Q&A
