Upgrades and deprecations
Upgrade Spring Boot 2.7 to the Latest Version: Java, Jakarta and Hop Order
In short
Move to Java 17, then go 2.7 to 3.x with the 3.0 migration guide, reach the latest 3.5.x, and only then take the 4.0 guide to 4.1, the current release (4.1.2). The javax to jakarta rename happens once, at 3.0. The Java 17 floor is the same on 3.0, 4.0 and 4.1.
Which Spring Boot release is current, and how long is each line supported?
On 19 November 2026 the Spring Boot project page and the 4.1.2 reference docs both show 4.1.2 as the current release. Spring's own API lists 4.2.0-RC2 as a prerelease, with 4.2.x given an initial release date of 30 November 2026. I would not plan around a release that has not shipped.
The support policy says a minor version is supported for at least 12 months and a major for at least 3 years, and a new minor or major arrives every six months. The dates that matter for this route come from Spring's generations API.
| Line | Initial release | Open source support ends | Commercial support ends |
|---|---|---|---|
| 2.7.x | 31 May 2022 | 30 June 2023 | 30 June 2029 |
| 3.5.x | 31 May 2025 | 30 June 2026 | 30 June 2032 |
| 4.0.x | 30 November 2025 | 31 December 2026 | 31 December 2027 |
| 4.1.x | 30 June 2026 | 31 July 2027 | 31 July 2028 |
In what order should the hops go?
The two official migration guides fix the order. The 3.0 guide says to upgrade to the latest 2.7.x first. The 4.0 guide says to upgrade to the latest 3.5.x first. So the route is 2.7.x, then 3.0 and up to 3.5.x, then 4.0, then 4.1.
The guides do not say whether you may skip from 2.7 straight to 3.5. The 3.5 release notes I fetched cover only upgrading from 3.4. I would take the 3.0 guide to cross the Jakarta line, then step up through the 3.x minor release notes one at a time.
Landing on 3.5.x is not a safe stopping point. Its open source support ended on 30 June 2026, and 4.0 ends on 31 December 2026. Only 4.1 has support into 2027, so I would plan to finish on 4.1.
What Java and framework baseline does each line need?
The Java move happens once. Every line from 3.0 to 4.1 has the same floor of Java 17, so the jump from Java 8 or 11 is a one-time cost at the first Boot hop.
The 2.7.18 reference docs say 2.7 is compatible up to and including Java 21. That lets you move the runtime to Java 17 while still on 2.7, as its own deploy, and keep that change apart from the framework change. This is my reading of the docs, not a step they prescribe.
If Gradle cannot resolve the Spring Boot plugin after the move, this fix page covers the Java 17 and Gradle causes.
| Line (page version) | Java | Spring Framework | Embedded Tomcat |
|---|---|---|---|
| 2.7 (2.7.18) | 8 up to 21 | 5.3.31 or above | 9.0, Servlet 4.0 |
| 3.5 (3.5.16) | 17 up to 25 | 6.2.19 or above | 10.1, Servlet 6.0 |
| 4.0 (4.0.9) | 17 up to 27 | 7.0.10 or above | 11.0, Servlet 6.1 |
| 4.1 (4.1.2) | 17 up to 27 | 7.0.10 or above | 11.0, Servlet 6.1 |
What does the Jakarta namespace change involve?
At 3.0 the dependencies move to Jakarta EE 10, such as Servlet 6.0 and JPA 3.1. The 3.0 guide says to replace javax dependencies with their jakarta equivalents, for example jakarta.servlet:jakarta.servlet-api, and then update the import statements.
The guide adds a warning that old Java EE artifacts must not stay in your build, directly or through another dependency. That transitive case is where most of the work hides. It names three migration aids: OpenRewrite's javax-to-jakarta recipes, the Spring Boot Migrator project and IntelliJ IDEA's migration support.
Checked against: source 4
What changes at the 4.0 hop?
The container baseline moves again, from Jakarta EE 10 with Tomcat 10.1 to Jakarta EE 11 with a Servlet 6.1 baseline and Tomcat 11. The 4.0 guide does not describe a second javax rename. Its large changes are Boot's own.
Boot is split into smaller modules, and spring-boot-starter-web becomes spring-boot-starter-webmvc. Boot now prefers Jackson 3, which uses tools.jackson packages, and Undertow support is removed. The guide offers classic starters as a temporary setup and a deprecated spring-boot-jackson2 module as a stop-gap.
Both guides recommend adding spring-boot-properties-migrator as a runtime dependency. It reports renamed or removed properties at startup, and you remove it once the migration is done.
What do the guides leave out?
They cover Spring Boot's own dependencies. Libraries that Boot does not manage, such as Spring Cloud, need versions you choose yourself, and both guides say so. The 3.0 guide also suggests moving to Spring Security 5.8 before 6.0.
This page compares vendor documents. It does not cover your tests, your build plugins or the commercial support terms.
What else do people ask?
Is Spring Boot 2.7 still supported?
Open source support ended on 30 June 2023. Spring's generations API lists commercial support for 2.7.x until 30 June 2029.
Do I need Java 17 before I touch Spring Boot 3?
Yes, Spring Boot 3.0 requires Java 17 or later. The 2.7.18 docs say 2.7 runs on up to Java 21, so the runtime can move first.
Sources
- Spring Boot generations API, support dates by line, fetched 2026-11-19
- Spring Boot wiki, supported versions policy, fetched 2026-11-19
- Spring Boot releases API, current and prerelease versions, fetched 2026-11-19
- Spring Boot 3.0 Migration Guide, wiki, fetched 2026-11-19
- Spring Boot 4.0 Migration Guide, wiki, fetched 2026-11-19
- Spring Boot 3.5 Release Notes, wiki, fetched 2026-11-19
- Spring Boot 2.7.18 reference, system requirements, fetched 2026-11-19
- Spring Boot project page, current version, fetched 2026-11-19
- Spring Boot 3.5.16 reference, system requirements, fetched 2026-11-19
- Spring Boot 4.0.9 reference, system requirements, fetched 2026-11-19
- Spring Boot 4.1.2 reference, system requirements, fetched 2026-11-19
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. This page compares vendor documents I fetched on 19 Nov 2026 (Spring's support API, the Spring Boot wiki guides and the reference system-requirements pages). I did not run these upgrades for it. It does not cover Spring Cloud, your tests or commercial support terms. Found a mistake? Tell me.