Share
Embed
Prepare your next Spring Boot Migration
Merlin Bögershausen
May 27, 2026
Transcript
16 slides
-
JNation 2026 — WORKSHOP Prepare Your Next Spring Boot Migration
A hands-on workshop to plan and execute a Spring Boot 4 migration with wave-based upgrades using OpenRewrite and Moderne. -
What Will We Do Today? 01 Migration Assessment Run a
first migration, gather code insight data 02 Wave Planning Analyze dependencies, organize upgrade waves 03 Establish a Baseline Normalize Maven, Java, Spring Boot versions 04 Java 17 + SB4 Smoke Test Upgrade Java 17, run Spring Boot 4 smoke test 05 Build QueryDSL Recipe Diagnose blocker, build custom recipe with AI 06 Finish in Waves Composite recipe, complete the upgrade in waves Coffee Break at 16.00 -
Your Toolkit for Today OpenRewrite Recipe Engine 7000+ recipes Spring
Boot, Security, Hibernate, Jakarta, Java Declarative YAML + imperative Java visitors Deterministic transforms Moderne CLI Developer Tool Run recipes locally Build LSTs from source Search code semantically Generate migration diffs Moderne Platform Organization Scale Visualize migration state across 100s of repos Run recipes at org scale DevCenter dashboards for tracking progress Data tables for analysis -
B E F O R E W E S T
A R T What is OpenRewrite? The open-source engine behind today's workshop -
OpenRewrite at a Glance What It Is → Open-source auto-refactoring
engine for Java, Kotlin, XML, YAML, properties, and more → Deterministic and auditable — same input always produces the same output → Works on a Lossless Semantic Tree (LST) — understands code structure, not just text → 7000+ recipes for frameworks, security, best practices What It Is NOT → Not AI-based — no hallucinations, no probabilistic guessing → Not a formatter — preserves your style, whitespace, and comments → Not a one-shot tool — recipes compose, chain, and layer for complex migrations → Not limited to Java — supports 10+ languages and file formats -
How OpenRewrite Works 1 Source Code .java, .xml, .yaml, .properties
2 Lossless Semantic Tree Full-fidelity code model (types, scope) 3 Recipe Execution Visitor pattern traverses + transforms LST 4 Modified LST Changes tracked as diffs on the original tree 5 Modified Source Style- preserving code printed back to disk Key insight: Because OpenRewrite operates on a semantic tree (not text), it understands types, scopes, and dependencies — enabling safe, large-scale transformations that regex and AI cannot guarantee. -
Anatomy of a Recipe Declarative Recipe (YAML) type: specs.openrewrite.org/v1beta/recipe name:
com.example/UpgradeSpringBoot4 displayName: Upgrade to Spring Boot 4 recipeList: - org.openrewrite.java .spring.boot4 .UpgradeSpringBoot_4_0 - com.example/FixQueryDSL - com.example/MigrateInternalLibs Declarative Most recipes are YAML — no Java code needed. Compose existing recipes into custom migrations. Composable Each one runs independently. Add your own recipes alongside community ones. Imperative For complex logic, write Java visitors. Full access to LST types, scopes, and the Maven model. Preconditions Target specific files (e.g., only Spring Boot 2.x projects). Skip LSTs that don't match. -
Spring Boot 4 Doesn't Travel Alone A migration is a
metro map of interconnected upgrades — not isolated stops. Java 8 11 17 21 Spring Boot 2.7 3.0 3.4 4.0 Spring Security 5.x 6.0 6.4 7.0 Hibernate 5.x 6.0 6.6 7.0 Jakarta EE — 9 10 11 Upgrade together -
OVERVIEW Workshop Overview A high-level overview of the Spring Boot
migration workshop. workshop-overview Scan to open -
MODULE 1 Migration Assessment Run an initial migration and gather
code insight data in the Moderne Platform. module-1-migration-assessment Scan to open -
MODULE 2 Wave Planning Analyze dependencies and organize upgrade waves
with the Moderne Platform and CLI. module-2-wave-planning Release Train Metro Plan Module only Ex. 2-2 -
MODULE 3 Establish a Baseline Normalize Maven, Java, and Spring
Boot versions before major upgrades. module-3-establish-baseline Scan to open -
MODULE 4 Java 17 Upgrade & Spring Boot 4 Test
Upgrade to Java 17 and run a Spring Boot 4 smoke test. module-4-smoke-test Scan to open -
MODULE 5 Building the Custom Recipe Diagnose the QueryDSL blocker
and build a custom upgrade recipe with AI assistance. module-5-build-querydsl-recipe Scan to open -
MODULE 6 Finish Migration in Waves Build a composite recipe
and complete the Spring Boot 4 upgrade in waves. module-6-wave-migration Scan to open -
Resources & Next Steps Documentation docs.openrewrite.org docs.moderne.io GitHub github.com/openrewrite github.com/moderneinc
YouTube Channel youtube.com/@moderneinc Events Hub moderne.ai/events/hub