Migrate to Spring Framework 6.0
Recipe ID
org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_0Artifact
org.openrewrite.recipe:rewrite-springMigrate applications to the latest Spring Framework 6.0 release.
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_0If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-spring:6.36.0Definition
This recipe runs the following recipes in order.
- Migrate to Spring Framework 5.3
org.openrewrite.java.spring.framework.UpgradeSpringFramework_5_3 - Migrate to Jakarta EE 10
org.openrewrite.java.migrate.jakarta.JakartaEE10 - Upgrade Gradle or Maven dependency versions
org.openrewrite.java.dependencies.UpgradeDependencyVersion - Migrate to Spring Kafka 3.0
org.openrewrite.java.spring.kafka.UpgradeSpringKafka_3_0 - Upgrade Gradle or Maven dependency versions
org.openrewrite.java.dependencies.UpgradeDependencyVersion - Update a Gradle plugin by id
org.openrewrite.gradle.plugins.UpgradePluginVersion - Upgrade Maven plugin version
org.openrewrite.maven.UpgradePluginVersion - Migrate removed Spring
Assertmethodsorg.openrewrite.java.spring.framework.MigrateSpringAssert - Migrate to ApacheHttpClient 5.x
org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5 - Migrate
setReadTimeout(java.lang.int)to SocketConfigsetSoTimeout(..)org.openrewrite.java.spring.framework.HttpComponentsClientHttpRequestFactoryReadTimeout - Migrate
ResponseEntityExceptionHandlerfrom HttpStatus to HttpStatusCodeorg.openrewrite.java.spring.framework.MigrateResponseEntityExceptionHandlerHttpStatusToHttpStatusCode - Migrate breaking changes in
ResponseStatusExceptionorg.openrewrite.java.spring.framework.MigrateResponseStatusException - Replaces deprecated
ClientHttpResponse#getRawStatusCode()org.openrewrite.java.spring.framework.MigrateClientHttpResponseGetRawStatusCodeMethod - Change method invocation return type
org.openrewrite.java.ChangeMethodInvocationReturnType - Migrate to Spring Data 3.0
org.openrewrite.java.spring.data.UpgradeSpringData_3_0 - Convert
JdbcTemplate.queryForLong(..)toqueryForObject(..)org.openrewrite.java.spring.data.JdbcTemplateQueryForLongMigration - Migrate
ListenableFuturetoCompletableFutureorg.openrewrite.java.spring.util.concurrent.ListenableToCompletableFuture
Data tables
Structured output this recipe can produce.
- Maven metadata failuresAttempts to resolve maven metadata that failed.
org.openrewrite.maven.table.MavenMetadataFailures - Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats