More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Spring Boot 4 Upgrade: OpenRewrite + Post-Migration Fixer

    1

    Upgrade Spring Boot 3.x to 4 with OpenRewrite, then fix the compile and test errors the recipe leaves behind.

    $18.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Spring Boot 4 Upgrade: OpenRewrite + Post-Migration Fixer

    Spring Boot 4 Upgrade: OpenRewrite + Post-Migration Fixer

    Example session with this skill installed

    Use the upgrade-spring-boot-4 skill to migrate this Maven project to Spring Boot 4. Use the pinned OpenRewrite versions, stop at each checkpoint so I can review, and write the migration report when the build is green.

    • Read your context and instructions
    • Compiled the spring boot 4

    Migration to Spring Boot 4.0.8 complete. The full build is green (56 tests, 0 failures) and the report is at ./sb4-migration-report.md. Nothing was committed. I paused at each checkpoint that changed files so you could review and commit.

    Summary

    CheckpointStatusDetails
    A: Preconditions✅ PassedSpring Boot 3.5.6, Java 17 toolchain, JDK 21, Maven wrapper 3.9.11, clean tree, green baseline build. Created branch chore/spring-boot-4-upgrade.
    B: Pre-migration scan✅ Nothing to fixNo Part 1 patterns found (e.g. KafkaProperties.buildProducerProperties(null)).
    C: OpenRewrite✅ Appliedrewrite-maven-plugin 6.46.1 + rewrite-spring 6.37.1 (pinned, resolve from Maven Central). Recipe UpgradeSpringBoot_4_0.
    C: Formatter✅ AppliedProject uses spring-javaformat; ran spring-javaformat:apply so the recipe output passes the format check.
    C: Sanity checks (§5.5)⚠ 1 fixThe recipe bumped pom.xml but left build.gradle on plugin 3.5.6. Bumped it to 4.0.8.
    Internal libraries➖ NoneOnly public Spring/Jakarta dependencies, so no versions needed from you.
    D: Compile + catalogue fixes✅ Cleantest-compile passed. 0 known issues triggered.
    E: Full build + report✅ Greenmvnw verify: Tests run: 56, Failures: 0, Errors: 0, Skipped: 2. BUILD SUCCESS.

    What changed (15 files, +52 / −37)

     M pom.xml                                   spring-boot-starter-parent 3.5.6 → 4.0.8, modular starters
     M build.gradle                              org.springframework.boot 3.5.6 → 4.0.8 (sanity check)
     M gradle/wrapper/gradle-wrapper.properties  Gradle 8.14.3 → 8.14.5 (recipe)
     M src/main/java/.../system/CacheConfiguration.java       recipe changes
     M src/test/java/.../owner/OwnerControllerTests.java      recipe: test migrations
     M src/test/java/.../owner/PetControllerTests.java
     M src/test/java/.../vet/VetControllerTests.java
     M src/test/java/.../PetClinicIntegrationTests.java
     … 7 more test classes
    

    sb4-migration-report.md (excerpt)

    sb4-migration-report.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Upgrading to Spring Boot 4 is more than a version bump. Modular auto-configuration, Jackson 3, Spring Framework 7, Hibernate 7, and the new test-starter split break builds in ways the OpenRewrite recipe alone does not fix. This skill makes your coding agent work through the migration step by step, with checks along the way:

    • Checks preconditions first: Boot 3.x, Java 17+, Gradle/Maven version, JDK compatibility, Java toolchain, Kotlin 2.2+, clean git tree, feature branch, green build.

    • Fixes known bad patterns before the rewrite, so the recipe doesn't leave them half-migrated.

    • Runs the official OpenRewrite Spring Boot 4.0 recipe. It uses a non-invasive Gradle init script (no build-file edits) or a one-line Maven command. It prefers the wrapper and handles Windows/PowerShell quoting.

    • Pins OpenRewrite versions that resolve from Maven Central. Newer OpenRewrite releases are moving to an authenticated repository and fail with Could not find org.openrewrite:rewrite-bom. The skill avoids this and explains the fallback.

    • Finds your internal libraries, corporate parent POMs, and convention plugins, and asks you for their Spring Boot 4–compatible versions. It never guesses.

    • Includes a catalogue of 25+ real post-migration errors with before/after fixes, covering:

    • o: modular starters (security, OAuth2, Kafka, Liquibase, WebMVC tests)

    • o: Jackson 2 → 3 (customizers, serializationInclusion, visibility, JsonNullable)

    • o: RestClient message converters

    • o: HttpHeaders no longer being a Map

    • o: @AutoConfigureObservability, Micrometer package moves

    • o: TestRestTemplate, MockMvc, and WebTestClient annotations; @Mock fields no longer initialised

    • o: Specification.unrestricted(), Hibernate 5 package removal

    • o: the OpenAPI generator (the recipe's version bump is too old to work)

    • o: OkHttp MockWebServer 3, Resilience4J in slice tests

    • o: Undertow removal

    • o: and more

    • Catches what the recipe gets wrong: Spring Boot versions left on 3.x in Gradle version catalogs, stale version pins that override the Spring Cloud BOM, and hard-coded versions it adds.

    • Runs your formatter after the rewrite (spring-javaformat, Spotless, ktlint), so formatter checks don't break the build.

    • Optional second step from 4.0 to the latest 4.x release.

    • Doesn't loop on slow builds: it stops and asks after two failed attempts on an unknown error.

    • Never commits. It pauses at five checkpoints so you can review and commit each phase separately.

    • Writes sb4-migration-report.md listing what changed, temporary measures to revert, remaining TODO-SB4 markers, new issues, and a suggested commit plan.

    Tested end to end on six projects (Spring Boot 3.4/3.5 → 4.0.8), each ending with a green full build and all tests passing:

    • spring-petclinic with Maven and with Gradle (Groovy DSL)
    • spring-petclinic-rest (Maven, OpenAPI generator, Spring Security, Jackson customisation, 216 tests)
    • spring-petclinic-microservices (Maven, 9 modules, Spring Cloud 2025.1, gateway, Resilience4J, OkHttp MockWebServer)
    • spring-petclinic-kotlin (Kotlin 2.3, Gradle Kotlin DSL)
    • a Gradle Kotlin DSL multi-module build with a version catalog and FAIL_ON_PROJECT_REPOS

    It was also used by the author on internal production Gradle services. The catalogue's code fixes were also applied verbatim to a purpose-built project, then compiled and tested on Spring Boot 4. Where the maintainers of these projects had published their own Spring Boot 4 upgrade, the skill's result was compared with theirs. What it can't do for you: it can't guess compatible versions of your private/internal libraries (it asks), and very unusual setups may still need a human for a few errors. The skill stops and tells you instead of looping. Invoke it with /upgrade-spring-boot-4 or just ask your agent to "upgrade this project to Spring Boot 4". It changes nothing until it has checked the preconditions and you have said "continue". Licensing note: this skill uses the OpenRewrite rewrite-spring recipe. Your own build downloads the recipe under its own licence (Moderne Source Available License), and you run it on your own code. This skill contains no OpenRewrite or recipe code. Spring and Spring Boot are trademarks of Broadcom Inc. OpenRewrite is a trademark of Moderne, Inc. This skill is not affiliated with or endorsed by either.

    What's inside

    • SKILL.md: the workflow with 5 review checkpoints, preconditions, version pins, recovery table, guardrails
    • references/known-issues.md: 25+ pre/post-migration fixes (Jackson 3, modular starters, Spring Cloud 2025.1, OpenAPI generator, MockWebServer 3, Hibernate 5 removal, Resilience4J, version catalogs, …)
    • references/report-template.md: structure of the migration report
    • references/upgrade-to-latest-4x.md: optional step to the newest 4.x
    • assets/rewrite-init.gradle: runs OpenRewrite on Gradle without editing your build files

    Tested on spring-petclinic (Maven and Gradle), petclinic-rest (216 tests), petclinic-microservices (9 modules, Spring Cloud), petclinic-kotlin (Gradle KTS), and a Gradle KTS multi-module build with a version catalog. All ended with a green build.

    Updates: free updates for buyers. The catalogue grows with every reported issue.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Browser

    File Scopes

    Run
    shell
    commands
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    Standard OpenRewrite recipes often leave projects in a non-compiling state due to breaking changes in Jackson 3, Hibernate 7, and Spring Framework 7; this skill bridges that gap by identifying and fixing 25+ specific post-migration errors that automated recipes typically miss.

    The skill is designed for any coding agent with file-system and terminal access (such as Cursor, Windsurf, or GitHub Copilot) that supports Maven or Gradle environments running Java 17+ and Spring Boot 3.x.

    No, the skill specifically handles complex build configurations like Gradle Version Catalogs, convention plugins, and multi-module Maven projects, manually prompt-testing for internal library versions instead of guessing.

    The skill includes a pre-migration checklist and five distinct review checkpoints where it pauses for your feedback, ensuring no code is committed until you have manually verified the changes.

    Beyond the automated rewrite, you get a comprehensive catalogue of real-world fixes for Spring Security, OAuth2, MockMvc, and message converters, plus a generated migration report detailing all TODOs and new dependencies.

    The skill is designed to stop and ask for human intervention after two failed attempts on an unknown error, preventing expensive LLM loops and ensuring you remain in control of the migration logic.

    New in LLM Ops