Migrate to Spring Framework 6.2
Recipe ID
org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_2Artifact
org.openrewrite.recipe:rewrite-springMigrate applications to the latest Spring Framework 6.2 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_2If 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 6.1
org.openrewrite.java.spring.framework.UpgradeSpringFramework_6_1 - Upgrade Gradle or Maven dependency versions
org.openrewrite.java.dependencies.UpgradeDependencyVersion - Migrate
org.springframework.util.Base64Utilstojava.io.Base64org.openrewrite.java.spring.framework.MigrateBase64Utils - Migrate
HandlerResult.hasExceptionHandler()togetExceptionHandler()org.openrewrite.java.spring.framework.MigrateHandlerResultHasExceptionHandlerMethod - Migrate
org.springframework.web.reactive.HandlerResult.setExceptionHandlermethodorg.openrewrite.java.spring.framework.MigrateHandlerResultSetExceptionHandlerMethod - Migrate
MethodArgumentNotValidException.errorsToStringListandresolveErrorMessagesorg.openrewrite.java.spring.framework.MigrateMethodArgumentNotValidExceptionErrorMethod - Migrate
ResourceHttpMessageWriter.addHeadersorg.openrewrite.java.spring.framework.MigrateResourceHttpMessageWriterAddHeadersMethod - Migrate deprecated
UriComponentsBuildermethodsorg.openrewrite.java.spring.framework.MigrateUriComponentsBuilderMethods - Migrate
WebExchangeBindException.resolveErrorMessagesorg.openrewrite.java.spring.framework.MigrateWebExchangeBindExceptionResolveErrorMethod - Migrate
setConnectTimeout(..)to ConnectionConfigsetConnectTimeout(..)org.openrewrite.java.spring.framework.HttpComponentsClientHttpRequestFactoryConnectTimeout - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Change method name
org.openrewrite.java.ChangeMethodName - Change method name
org.openrewrite.java.ChangeMethodName - Change type
org.openrewrite.java.ChangeType - Change type
org.openrewrite.java.ChangeType
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