Spring Boot 4.0.0-M3 switches its JSON auto-configuration to Jackson 3. Time to prep your apps and libraries for the new groupIds, packages, and a few API renames.
🔗 LINKS
👉 Check out the Jackson 3 Migration Guide:
👉 Also useful, the OpenRewrite recipe:
🔸 TLDR
Spring Boot 4.0.0-M3 now requires Jackson 3 for its auto-config. Jackson 3 changes groupId/packages (mostly com.fasterxml.jackson.* → tools.jackson.*) and introduces a few class/method renames. Use the OpenRewrite recipe to automate most of the tedious changes.
🔸 WHY THIS MATTERS
▪️ Boot 4 defaults = Jackson 3 → you’ll pull Jackson 3 when you upgrade, even if your code still imports 2.x types.
▪️ Breaking changes: new groupIds/packages and some renamed classes/methods (e.g., JsonObjectSerializer → ObjectValueSerializer).
▪️ Coexistence path: if a library still needs Jackson 2, you can manually wire a 2.x ObjectMapper alongside Boot’s Jackson 3 auto-config (temporary bridge).
🔸 WHAT TO CHANGE
▪️ Dependencies: switch most com.fasterxml.jackson.* artifacts to tools.jackson.* (exception: jackson-annotations stays under com.fasterxml.jackson.core).
▪️ Packages/Imports: update code from com.fasterxml.jackson.* to tools.jackson.* where applicable.
▪️ APIs: adapt to a few class/method renames flagged in the release notes and migration guide.
▪️ Build tooling: run OpenRewrite UpgradeJackson_2_3 to auto-migrate dependencies, imports, and common API changes.
🔸 QUICK START (SAFE MIGRATION FLOW)
▪️ Pin Boot to 4.0.0-M3 (or newer) on a branch. Home
▪️ Run OpenRewrite recipe org.openrewrite.java.jackson.UpgradeJackson_2_3.
▪️ Fix remaining compile errors (mostly renamed classes/methods).
▪️ Smoke-test JSON (de)serialization in your critical paths.
▪️ If needed, temporarily wire a Jackson 2 mapper for legacy libs while you finish the upgrade.
🔸 TAKEAWAYS
▪️ Spring Boot 4 standardizes on Jackson 3 starting M3—plan the upgrade now.
▪️ Expect groupId/package changes and some API renames; most are mechanical.
▪️ OpenRewrite can save days of manual refactors.
▪️ Check the official Jackson 3 migration guide for edge cases.
#️⃣ #SpringBoot #Jackson #Java #JSON #OpenRewrite #Migration #SpringFramework #Backend #DevTools #Refactoring