Spring Cloud 2025.0

When upgrading to Spring Cloud 2025.0, refer to the Spring Cloud 2025.0 Release Notes for newly introduced APIs, deprecated APIs, and breaking changes.

The io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_0 recipe automates most of the changes introduced in Spring Cloud 2025.0. You can use it to update your project to the latest Spring Cloud 2025.0.x release.

The recipe will:

  • Upgrade org.springframework.cloud:spring-cloud-dependencies (and the spring-cloud-starter-parent Maven parent) to the 2025.0.x release line.

  • Rename Spring Cloud configuration properties that changed, and comment out those removed so you can address them manually.

  • Convert Actuator endpoint access controls from the removed boolean management.endpoint.<name>.enabled to the new management.endpoint.<name>.access enum (trueread_only, falsenone).

  • Adopt the new module names for the Spring Cloud Gateway dependencies:

    • spring-cloud-gateway-serverspring-cloud-gateway-server-webflux (and the matching spring-cloud-starter-gateway-serverspring-cloud-starter-gateway-server-webflux).

    • spring-cloud-gateway-server-mvcspring-cloud-gateway-server-webmvc (and the matching starter).

    • The former spring-cloud-gateway-mvc and spring-cloud-gateway-webflux artifacts, which host the Proxy Exchange handlers, are renamed to spring-cloud-gateway-proxyexchange-webmvc and spring-cloud-gateway-proxyexchange-webflux.

See its entry in the Recipe Catalog for the full list of recipes this upgrade applies, each with its options and a before/after example.

Run the Recipe

You can apply this recipe with any OpenRewrite-compatible tool. The tabs below show three of them: the Arconia CLI, the OpenRewrite Gradle plugin, and the OpenRewrite Maven plugin. See Running Recipes for a comparison of when to pick each one.

  • Arconia CLI

  • Gradle

  • Maven

arconia rewrite run --recipe-name io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_0

First, create an init.gradle file in your project root with the following content.

initscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath("org.openrewrite:plugin:latest.release")
    }
}

rootProject {
    plugins.apply(org.openrewrite.gradle.RewritePlugin)
    dependencies {
        rewrite("io.arconia.migrations:rewrite-spring:latest.release")
    }

    // Remove when project repositories are disabled
    afterEvaluate {
        if (repositories.isEmpty()) {
            repositories {
                mavenCentral()
            }
        }
    }

    configurations.named("rewrite") {
        canBeConsumed = false
    }
}

Then, run the following command.

./gradlew rewriteRun \
    --init-script init.gradle \
    --no-parallel \
    -DactiveRecipe=io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_0

You can remove the init.gradle file afterwards.

./mvnw -U org.openrewrite.maven:rewrite-maven-plugin:run \
  -Drewrite.recipeArtifactCoordinates=io.arconia.migrations:rewrite-spring:LATEST \
  -Drewrite.activeRecipes=io.arconia.rewrite.spring.cloud2025.UpgradeSpringCloud_2025_0