Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

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.

LineInitial releaseOpen source support endsCommercial support ends
2.7.x31 May 202230 June 202330 June 2029
3.5.x31 May 202530 June 202630 June 2032
4.0.x30 November 202531 December 202631 December 2027
4.1.x30 June 202631 July 202731 July 2028

Checked against: source 1, source 2, source 3, source 8

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.

Checked against: source 1, source 4, source 5, source 6

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)JavaSpring FrameworkEmbedded Tomcat
2.7 (2.7.18)8 up to 215.3.31 or above9.0, Servlet 4.0
3.5 (3.5.16)17 up to 256.2.19 or above10.1, Servlet 6.0
4.0 (4.0.9)17 up to 277.0.10 or above11.0, Servlet 6.1
4.1 (4.1.2)17 up to 277.0.10 or above11.0, Servlet 6.1

Checked against: source 7, source 9, source 10, source 11

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.

Checked against: source 4, source 5, source 9, source 11

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.

Checked against: source 4, source 5

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

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.

Keep reading

Next step

Have a project in mind?

Tell me about it. A discovery call within 48 hours.