Spring Cloud 2026.0

When upgrading to Spring Cloud 2026.0, refer to the Spring Cloud 2026.0 Release Notes for newly introduced APIs, deprecated APIs, and breaking changes. Spring Cloud 2026.0 is the release train for Spring Boot 4.2, and the Spring Boot 4.2 upgrade recipe chains this recipe.

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

The recipe will:

  • Upgrade org.springframework.cloud:spring-cloud-dependencies to the 2026.0.x release line.

  • Upgrade all other org.springframework.cloud dependencies to the 5.1.x release line.

  • Rename Spring Cloud configuration properties that changed, such as the Consul config prefix and the Gateway metrics path tags, and comment out those removed so you can address them manually, such as the Vault key-value backend version and the Vault database backends.

  • Keep Spring Cloud Config client retry enabled. Config Client retry moved from Spring Retry to the retry support built into Spring Framework and is no longer enabled by having Spring Retry on the classpath, so in a module that uses the Config Client and depends on Spring Retry, the recipe sets spring.cloud.config.retry.enabled=true next to spring.cloud.config.fail-fast in the configuration files that set it, and removes the Spring Retry dependency unless the code still uses it.

  • Migrate Spring Cloud Gateway usages to the 5.1 release: the retry filter moved from Reactor Addons to the retry support built into Reactor and dropped the basedOnPreviousValue backoff flag, so the recipe removes that argument from RetryConfig.setBackoff(…​) calls and BackoffConfig constructors.

  • Migrate Spring Cloud Contract to Stubborn Contract, its continuation, since Spring Cloud Contract was archived and is no longer part of the release train. The recipe moves the starters, modules, BOM, Maven plugin, and Gradle plugin to the sh.stubborn coordinates on the 0.1.x line, renames the org.springframework.cloud.contract packages and the JSON and XML assertion packages, renames the spring.cloud.contract.stubrunner and spring.cloud.contract.verifier property prefixes to their stubborn.contract equivalents, and replaces the JUnit 4 stub runner rule and its @Rule annotation with the JUnit 5 extension and @RegisterExtension. Stubborn Contract splits its Spring integration into separate artifacts, so a direct dependency on a Spring Cloud Contract module is moved to the Spring Cloud or Spring variant that still provides every class the original module did. Existing contracts and WireMock stubs run unchanged. This step is also available on its own as the MigrateSpringCloudContractToStubbornContract recipe, and it follows the Stubborn Contract migration guide.

Some changes in Spring Cloud 2026.0 are deliberately not automated. Stubborn Contract 0.1.x targets Spring Boot 4.1 and its BOM manages Spring Cloud Stream and REST Assured versions, so review those against the versions Spring Boot 4.2 manages. The standalone spring-cloud-contract-stub-runner-boot application has no Stubborn Contract counterpart. Gateway no longer depends on reactor-extra, so code that used Reactor Addons types through Gateway must declare that dependency itself, and the apply(…​) overload of the retry filter factory now takes Reactor’s own retry and repeat types. A basedOnPreviousValue entry in the backoff arguments of a route definition is silently ignored and can be removed. A custom configServerRetryInterceptor bean, used to take full control of Config Client retry with legacy bootstrap, must now be a plain AOP MethodInterceptor instead of a Spring Retry RetryOperationsInterceptor. The retry settings passed as parameters of a configserver: import location have no equivalent of spring.cloud.config.retry.enabled, so set that property in a configuration file. Spring Cloud Consul no longer declares or manages the com.ecwid.consul:consul-api and Gson dependencies, so a project that declared the Consul client without a version has to pin one.

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.cloud2026.UpgradeSpringCloud_2026_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.cloud2026.UpgradeSpringCloud_2026_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.cloud2026.UpgradeSpringCloud_2026_0