Chapter 1 · Practice 1 of 4
Run a current Spring Boot release on an LTS Java
Why it matters
Spring Boot 4.1 needs at least Java 17 and is compatible up to Java 26. It builds on Spring Framework 7, Jakarta EE 11 (Servlet 6.1) and Hibernate 7.
Pick a Java LTS release for production. Java 21 or later is worth it on its own, because it unlocks virtual threads (see the concurrency chapter), and the Boot docs strongly recommend Java 24 or later for the best virtual thread experience.
| Component | Spring Boot 4.1 |
|---|---|
| Java | 17 minimum, compatible to 26 |
| Spring Framework | 7.0.9 or above |
| Embedded servers | Tomcat 11.0, Jetty 12.1 |
| Build tools | Maven 3.6.3+, Gradle 8.14+ or 9 |
| Native images | GraalVM 25 or above |
Undertow is no longer supported in Spring Boot 4, because it is not yet Servlet 6.1 compatible.
Do
- Use a Java LTS release in production images
- Keep the Boot version current within its line
- Check the system requirements page before a major upgrade