What’s New in Spring Boot 4.0? Core Dependencies, Virtual Threads, and More
Spring Boot 4.0 launches with Java 17‑21 support, Jakarta EE 11, Servlet 6.1, virtual‑thread concurrency, modularization for GraalVM, new declarative HTTP client, fluent JDBC/JMS APIs, built‑in resilience annotations, and migration guidance for existing Spring Boot projects.
Core Dependencies
Java version: minimum Java 17, strongly recommended Java 21 (enables virtual threads) and Java 25.
Specification base: upgraded to Jakarta EE 11.
Web container: mandatory Servlet 6.1.
✅ Supported containers: Tomcat 11.0, Jetty 12.1.
⚠️ Removed support: Undertow (not yet compatible with Servlet 6.1).
Key Features Overview
Spring Framework 7.0 provides the solid foundation for Spring Boot 4.0.
Concurrency revolution: Virtual Threads become the core concurrency model, dramatically increasing single‑machine throughput.
Developer experience improvements: @RequestMapping Version: API version control for efficient routing of version‑specific requests. @HttpServiceClient: native declarative HTTP client that replaces OpenFeign. JdbcClient & JmsClient: new fluent APIs that make code more concise and readable.
Architecture slimming: deep modularization refactor improves GraalVM native image startup speed and memory efficiency.
Built‑in resilience: core integration of @Retryable and @ConcurrencyLimit eliminates the need for external circuit‑breaker libraries.
Version Guidance
For projects currently on Spring Boot 3.x, it is strongly recommended to upgrade to the latest 3.5 release first.
Spring Boot 3.5 is the final major release of the 3.x line; open‑source support continues until June 2026, commercial support until June 2032.
3.5 introduces key features and migration mechanisms that smooth the transition to Spring Boot 4.x.
Technical reference repository (relevant to Spring ecosystem): https://gitee.com/log4j/pig
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
