Skip to content
The Code Storm
The Storm Report1:15

Spring Boot 4 Migration: 5 Changes That Break Your Build

Upgrading from Spring Boot 3 to 4? These five changes break your build first. Here's the fix for each.

→ 1. Starters split: spring-boot-starter-web → spring-boot-starter-webmvc, and Flyway/Liquibase need their own starter → 2. Jackson 3: com.fasterxml.jackson → tools.jackson (annotations keep their old package) → 3. @MockBean / @SpyBean removed: use @MockitoBean / @MockitoSpyBean → 4. Undertow removed: switch to Tomcat or Jetty → 5. Null safety: JSpecify annotations, so Kotlin and null checkers may flag new errors → Stuck? spring-boot-starter-classic while you migrate, and always start from the latest 3.5.x

Source: the official Spring Boot 4.0 Migration Guide (GitHub wiki), checked 8 Oct 2026.

The Storm Report: Java and Spring Boot news in 60 seconds.

Instagram: @thecodestormdev