OpenRewrite can automate supported parts of a Java or Spring Boot upgrade, but there is no single recipe for every migration. Choose a recipe for your project’s actual source and target versions, run it against a reviewable baseline, then inspect the changes and verify the build and tests.
Choose a recipe for the versions you are migrating between
Start by recording the project’s current Java, Spring Boot, build-tool and related framework versions, then identify the intended target. OpenRewrite’s recipes are version-specific: a recipe for one Spring Boot transition should not be treated as a general-purpose upgrade for another.
As an Amazon Associate I earn from qualifying purchases.
Spring Boot 3
The Spring Boot 3 recipe catalog includes migration targets through Spring Boot 3.5, with recipes for broader version upgrades and focused changes. Catalog examples include property migrations, SpringDoc-related changes, alternatives to deprecated RestTemplateBuilder methods, and renaming server.max-http-header-size to server.max-http-request-header-size. These entries describe supported transformations; they do not mean every change applies to every project. Some entries are labeled Community Edition, so check the catalog for the exact recipe’s designation and access requirements.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Spring Boot 4
The Spring Boot 4 recipe catalog lists a composite migration to Boot 4.0 and a separate migration for modular starters. Its documented areas include modular starter dependencies and package changes, Boot properties, web-server class relocation, starter renames, replacing @MockBean and @SpyBean, and focused updates involving Flyway, OpenAPI Generator, Jackson BOM overrides, jsonschema2pojo and test configuration. Some recipes are marked Community Edition; verify the label and availability of the specific recipe you plan to run.
Java upgrades
Java upgrades use Java migration recipes rather than assuming a Spring Boot recipe will cover them. The Java 17 migration guide documents the separate rewrite-migrate-java module. Its described work includes selected deprecated-API remediation, Java EE dependency migration, and upgrades to well-known third-party libraries where module-system-compatible releases exist. The guide specifies that its Java EE dependency migration support is limited to Maven build files; that qualification applies to this support, not to every Java migration recipe or all OpenRewrite functionality.
Understand what a composite migration can change
A composite recipe can chain multiple transformations and affect more than application source code. For example, OpenRewrite’s documented Spring Boot 2.6 composite chains a prior Boot migration, updates Spring Boot dependency, plugin and parent versions, migrates properties, and includes Spring Framework, Spring Data, SpringDoc and MyBatis-related steps. That example illustrates why the migration path matters; it is not a recommendation to target Boot 2.6 for a new upgrade.
Rank #2
Before running a recipe, review its documented scope and compare it with the project’s build files, dependencies and application configuration. A recipe automates only the transformations its rules support. It does not establish that every project-specific compatibility issue will be handled.
Free tools Windows power users keep installed
One-click scans. No signup required.
Run the recipe with a reviewable workflow
- Record the baseline. Note the current Java, Spring Boot, build-tool and relevant framework versions, plus the intended target. Preserve a clean, reviewable baseline in version control.
- Select the exact recipe. Use the official catalog or migration guide for the source-to-target transition. Check recipe scope and any Community Edition label or other access condition.
- Set up the plugin and recipe module. Follow the current guide for the project’s Maven or Gradle workflow, or the documented command-line option when applicable. Plugin versions and recipe coordinates change, so copy commands and coordinates from the live documentation rather than relying on an old snippet.
- Confirm artifact access. The Java 17 guide says OpenRewrite artifacts, including Maven and Gradle plugins, are distributed through the Code Genome Project repository and require authentication. Its guide describes source-available recipe modules, compiled binaries for Moderne customers, and local compilation and publication for non-commercial use. Check the current artifact and access instructions for your situation before running the build.
- Run the recipe on a branch or equivalent copy. Keep the changes isolated so you can inspect what the recipe altered and recover cleanly if the result needs adjustment.
- Review the diff and validate. Inspect source, build files, dependencies, plugins and configuration changes. Run the project’s tests and relevant build and compatibility checks; manually resolve issues the recipe did not migrate.
- Commit only after review. The Spring Boot 1-to-2 guide likewise directs users to inspect the diff, manually fix changes not migrated automatically, and commit afterward.
What OpenRewrite does not guarantee
OpenRewrite performs supported, rule-based transformations. A successful recipe run is not proof that an upgrade is complete, that the application will build in every environment, or that runtime behavior is unchanged. Results depend on the selected recipe and the project’s code and configuration. Treat generated edits as a starting point for engineering review, tests and any necessary manual migration work.
For repository-scale execution, the official documentation describes Moderne’s hosted platform; the ordinary local recipe workflow does not inherently require it. Artifact distribution and platform availability can change, so consult the current documentation before choosing an execution or access model.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to compare migration recipes
When several options appear relevant, compare their practical fit rather than treating them as interchangeable products:
Quick Recap
Best Value
Rank #4
- Version coverage: Does the recipe match the project’s source and intended target versions?
- Documented scope: Which code, dependencies, build configuration and properties does it address, and what limitations are stated?
- Build and access needs: Does the guide support the project’s Maven or Gradle workflow, and are credentials or other access conditions required?
- Recipe designation: Is the specific catalog entry labeled Community Edition or subject to another availability condition?
- Remaining validation: What review, tests and manual fixes will the project need after transformations run?
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




