Open source support for Spring Boot 3.5 ended on 30 June 2026. That date comes from the Spring Boot support data on endoflife.date, and it means the last free 3.x line gets no more community patches. Commercial support for 3.5 runs until 2032 if you pay for it. Everyone else has a Boot 4 upgrade on the backlog, whether it has a ticket yet or not. (Dates and versions in this post reflect the state at the end of September 2026.)

This is not a war story about migrating a fleet of legacy services. My hands-on time with Boot 4 has been on a greenfield Kotlin platform, behind the kind of quality gates I’d want around any upgrade: ArchUnit, jMolecules, SonarQube, Spotless and OpenRewrite. That’s the angle here: where the differences hide, and which checks find them.

Five upgrades behind one version number

Spring Boot 4.0.0 was released on 20 November 2025 (Phil Webb’s announcement on the Spring blog). The version number suggests one migration. In practice you are moving several things at once:

  • Spring Framework 7 and Jakarta EE 11 with a Servlet 6.1 baseline
  • Spring Security 7
  • Jackson 3, which came out on 3 October 2025 and moves most of its packages from com.fasterxml.jackson to tools.jackson
  • JSpecify nullability annotations across the Spring portfolio
  • a modularised Boot itself, with smaller jars and new starter names

The Boot 4.0 migration guide on GitHub is honest about the order. Its first instruction is to upgrade to the latest 3.5.x before anything else, so you are building against the most recent dependencies of the old line. I’d take that literally. Get onto the last 3.5 patch, clear every deprecation warning, and only then change the major version. Deprecated APIs are exactly what 4.0 removes.

Java is the one axis you can decouple. Boot 4 still runs on Java 17; the release announcement promises first-class support for Java 25 while keeping 17 compatibility. If your services are on 17 or 21 today, do the Boot upgrade on the JDK you already run, ship it, and move the JDK in a separate change. If something breaks, you then know which change did it.

The loud failures are the good ones

A lot of Boot 4 breaks at compile time, and that is a gift.

@MockBean and @SpyBean are gone, replaced by @MockitoBean and @MockitoSpyBean. spring-boot-starter-web is now spring-boot-starter-webmvc. @SpringBootTest no longer sets up MockMvc on its own; you add @AutoConfigureMockMvc. Undertow is out, because Boot 4 requires a Servlet 6.1 baseline and Undertow is not yet compatible with it. Spock integration was removed as well, which matters to anyone with an older Groovy test suite.

None of this reaches production by accident. The build goes red, somebody fixes it. If the red build is too much to face in one go, the migration guide offers spring-boot-starter-classic and spring-boot-starter-test-classic as a bridge back to the old monolithic dependency layout. I’d use them to get a first green build and then remove them before the upgrade counts as done, because a bridge that stays becomes the architecture.

For Kotlin there is one loud failure worth calling out. The migration guide warns that the new JSpecify annotations can lead to compilation failures in Kotlin, “because of now nullable or non-nullable types”. The Kotlin compiler reads those annotations, so a Spring API that used to come through as a platform type can now be explicitly nullable or non-null, and code that relied on the vagueness stops compiling. That is annoying on the day but good in the long run, because every one of those errors marks a place where your code made an assumption about null that the framework never promised. Fix them properly; sprinkling !! to get green throws away the only useful thing the upgrade gave you there.

The silent one: Jackson 3

The failure I’d worry about is the one that compiles, starts and passes a smoke test, and then sends different JSON.

Jackson 3 changed a list of defaults. According to the Jackson project’s own migration notes, SORT_PROPERTIES_ALPHABETICALLY, WRITE_ENUMS_USING_TO_STRING, READ_ENUMS_USING_TO_STRING, FAIL_ON_NULL_FOR_PRIMITIVES and FAIL_ON_TRAILING_TOKENS are now enabled, WRITE_DATES_AS_TIMESTAMPS and DEFAULT_VIEW_INCLUSION are now disabled, and all Jackson exceptions are unchecked. Spring Boot’s own configuration can override some of these, so not every change necessarily reaches your wire format. Which ones do depends on your configuration and your models.

Take the enum case. If one of your enums overrides toString() for logging, Jackson 3 may now write that string where it used to write the constant’s name. Your own service keeps working. The consumer three teams away that switches on "IN_PROGRESS" does not. Nothing in your logs, nothing in your build.

Boot gives you two ways to buy time. The property spring.jackson.use-jackson2-defaults=true makes the auto-configured JsonMapper behave as closely as possible to Boot 3.x, and the spring-boot-jackson2 module keeps Jackson 2 running under a spring.jackson2 namespace. The guide ships that module in a deprecated form that will be removed in a future release. I’d accept the property as a deliberate, documented decision. I would not accept either as the default way to avoid looking at your payloads.

The check that catches this is a serialisation contract test that runs against the mapper Spring actually configures, not one you build by hand in the test:

@SpringBootTest
class OrderJsonContractTest(@Autowired private val mapper: JsonMapper) {

    @Test
    fun `serialised order matches the published contract`() {
        val actual = mapper.writeValueAsString(sampleOrder())
        val expected = javaClass.getResource("/contracts/order.json")!!.readText()
        JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT)
    }
}

The expected file is written once, on the Boot 3 side, before the upgrade. After the upgrade it tells you exactly which fields changed shape. Property order doesn’t fail this assertion, and that’s intended: no sane client depends on field order, while enum values and date formats are real contract changes. Write one of these per public payload type, not per endpoint.

Contract-first development makes this cheaper. When APIs are specified in OpenAPI 3 first, with clients and event classes generated from the specification, you already have a list of the payloads that are public, and a spec you could validate responses against. It doesn’t remove the need for the golden files, though. The spec says a field is a string, not which string.

Gates that do the searching for you

OpenRewrite has a composite recipe for this upgrade, org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0 (the community edition). According to its documentation it chains the 3.5 upgrade, Framework 7, Security 7, the Kotlin 2.2 plugin upgrade, the starter changes and test annotation updates such as the @MockBean replacement into one run. The recipe definition in rewrite-spring also pulls in Hibernate 7.1 and Testcontainers 2.

Mind the licence: the recipe sits in rewrite-spring under the Moderne Source Available License, so check it against your company’s rules before it runs in your pipeline. The recipes are useful, and I run OpenRewrite as a quality gate in CI together with Spotless and SonarQube. For the upgrade recipe I’d run it on a branch, read the diff like a colleague’s pull request, and commit it in reviewable pieces. It handles the mechanical renames. The Jackson behaviour change above is not one of them.

ArchUnit is the second gate, and it is cheap to add. Jackson 3 keeps jackson-annotations in the old com.fasterxml.jackson package, which makes a half-migrated codebase look plausible at a glance. One rule stops Jackson 2 databind from creeping back in through a copied utility class or a stale dependency:

@ArchTest
val noJackson2Databind: ArchRule =
    noClasses().should().dependOnClassesThat()
        .resideInAnyPackage("com.fasterxml.jackson.databind..", "com.fasterxml.jackson.core..")

If ArchUnit already guards your architecture, a rule like this costs a few lines in a file that exists anyway.

For Security 7, my advice is duller: test the URL. Whatever the upgrade changes in how your authorisation rules match requests, a MockMvc test per protected path that asserts 401 or 403 for the wrong caller and 200 for the right one will tell you whether the rules still mean what they meant. A test that only checks the SecurityFilterChain bean exists will not.

Testcontainers against a real PostgreSQL catches ORM and driver surprises that an in-memory database would hide. WireMock stubs for downstream services show you whether your outbound JSON changed before the downstream team does.

When to leave a Boot 3 service alone

Not every service has to move this quarter. A stable service with little change, no public JSON surface worth mentioning and a commercial support contract covering 3.5 can wait. It is a legitimate decision as long as someone writes it down with an end date.

What I would not do is pick 4.0 as the target in late 2026. Per the same endoflife.date data, 4.0 loses open source support on 31 December 2026, and 4.1 has been out since June 2026 with open source support until 31 July 2027. If you’re starting the upgrade now, go to 4.1 and skip a second small migration three months later.

And if a service is under active development, don’t wait for a quiet quarter. There won’t be one, and the upgrade only gets larger.

I’m a senior Java architect working on backend platforms, architecture and the quality gates that decide what ships. From January 2027 I’m available for freelance engagements. More about my work on marc-nuetzel.de.