Ace8 is the modernization practice of AceMQ.24/7 support from AceMQ after go-live
Book an Assessment

OpenRewrite

OpenRewrite recipes for Java 21 and Spring Boot 3.

Deterministic rewrites for the mechanical part of an upgrade. The same result on every run, reviewed by an engineer.

The short answer

OpenRewrite is an open-source tool that rewrites Java source code using recipes: deterministic, repeatable transformations for upgrades such as Java 21 and Spring Boot 3. A recipe gives the same result on every run, which free-form AI output cannot promise. Ace8 runs recipes, tests the result and has an engineer review the diff.

Mechanics

How recipes work

OpenRewrite parses source code into a tree that keeps formatting and comments, applies a recipe to that tree, and writes the result back. A recipe is a set of small, rule-based changes. Recipes can be combined, so one composite recipe can carry a whole upgrade.

Because the rules are explicit, a recipe run is reproducible. Run it twice and you get the same diff. That makes it easy to audit and easy to run across many repositories.

OpenRewrite is built into Maven and Gradle as a plugin. A run produces a patch, which you review like any other change.

Java 21

Recipes we run for Java 21

The Java migration recipes handle removed and deprecated APIs, updated build settings and common library bumps. Confirm names against the current catalogue before use, since they change between releases. The Java 21 upgrade recipe is typically org.openrewrite.java.migrate.UpgradeToJava21.

Recipes do not change your CI image, your container base image or your runtime flags. Those are separate edits. See Java upgrade for the breaking changes recipes cannot see.

Spring Boot 3 and Jakarta

Recipes for Spring Boot 3 and Jakarta

Spring Boot 3 requires Java 17 or later and the Jakarta EE namespace. Two recipe families do most of the mechanical work: the Spring Boot 3 upgrade (for example org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0) and the javax to jakarta migration (org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta).

The first changes dependencies, properties and deprecated Spring calls. The second rewrites imports, descriptors and annotations. Confirm names against the current catalogue before use. For the full checklist, see Spring Boot 3 migration.

Evidence

Run log from our sample repo

We are running these recipes on an open-source Java 8, Spring Boot 2 and javax application. The log will list each recipe, the files it changed, the size of the diff, compile errors that remained and the test outcome, including the runs that failed. It is not published yet, so we do not state results here.

Field in the run logWhy it is recorded
Recipe name and versionSo the run can be repeated
Files changed and lines changedTo size the review
Compile errors after the runTo show what recipes leave undone
Tests before and afterTo prove behavior held, or show where it did not
Manual fixes and review minutesTo show the real effort

Limits

What recipes leave undone

  • Behavior that depends on configuration outside the source code.
  • Libraries that have no recipe, or whose recipe stops short.
  • Design changes, such as moving from EJB to Spring beans where the semantics differ.
  • Security configuration changes in frameworks that rewrote their model.
  • Tests that fail for reasons unrelated to the rewrite.

Extending

Writing a custom recipe

When the same internal pattern appears hundreds of times, a custom recipe is cheaper than hundreds of manual edits. Typical cases are a proprietary logging wrapper, an in-house client library or a homegrown annotation. We write the recipe, test it on a sample, and run it across the estate.

Together

How this fits with AI-assisted tools

Run recipes first, because they are deterministic and cheap to check. Use an AI-assisted tool such as AWS Transform for what the recipes leave behind. Then test, then review. That order keeps the least predictable step as small as possible.

FAQ

Frequently asked.

Something else on your mind? Ask an engineer.

It is an open-source tool that rewrites Java source code using recipes, which are deterministic, repeatable transformations. It is used for upgrades such as Java 21 and Spring Boot 3.

Know the cost before anything moves.

A fixed-price assessment gives you the inventory, the risk score and a phased plan. Scope and cost are fixed before the migration starts.

Book a Fixed-Price Assessment

Get in touch

Talk to a modernization engineer

Tell us what you run today. An engineer, not a sales script, replies within one business day.

305-204-2607info@ace8.io

66 W. Flagler St. 9th Floor
Miami, FL 33130

What are you moving off? *

Fixed price. Scope and cost before any migration starts.