META-INF.rewrite.spring-boot-30.yml Maven / Gradle / Ivy
Show all versions of rewrite-spring Show documentation
#
# Copyright 2023 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0
displayName: Migrate to Spring Boot 3.0
description: >
Migrate applications to the latest Spring Boot 3.0 release. This recipe will modify an
application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have
changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data,
etc) that are required as part of the migration to Spring Boot 2.7.
tags:
- spring
- boot
recipeList:
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_7
- org.openrewrite.java.spring.boot3.RemoveEnableBatchProcessing
- org.openrewrite.java.migrate.UpgradeToJava17
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: org.springframework.boot
artifactId: "*"
newVersion: 3.0.x
overrideManagedVersion: false
retainVersions:
- org.thymeleaf:thymeleaf-spring5
- org.thymeleaf.extras:thymeleaf-extras-springsecurity5
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: org.springframework
artifactId: "*"
newVersion: 6.0.x
- org.openrewrite.maven.UpgradeParentVersion:
groupId: org.springframework.boot
artifactId: spring-boot-starter-parent
newVersion: 3.0.x
retainVersions:
- org.thymeleaf:thymeleaf-spring5
- org.thymeleaf.extras:thymeleaf-extras-springsecurity5
- org.openrewrite.gradle.plugins.UpgradePluginVersion:
pluginIdPattern: org.springframework.boot
newVersion: 3.0.x
- org.openrewrite.gradle.plugins.UpgradePluginVersion:
pluginIdPattern: io.spring.dependency-management
newVersion: 1.1.x
- org.openrewrite.gradle.UpdateGradleWrapper:
version: ^7.4
addIfMissing: false
- org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
- org.openrewrite.java.spring.boot3.RemoveConstructorBindingAnnotation
- org.openrewrite.java.spring.boot2.MoveAutoConfigurationToImportsFile
- org.openrewrite.java.spring.boot3.ActuatorEndpointSanitization
- org.openrewrite.java.spring.boot3.MigrateMaxHttpHeaderSize
- org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty
- org.openrewrite.java.spring.boot3.ConfigurationOverEnableSecurity
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_0
- org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
- org.openrewrite.java.spring.boot3.UpgradeSpringDoc_2
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0
- org.openrewrite.java.spring.cloud2022.UpgradeSpringCloud_2022
- org.openrewrite.hibernate.MigrateToHibernate61
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.ActuatorEndpointSanitization
displayName: Remove the deprecated properties `additional-keys-to-sanitize` from the `configprops` and `env` end points
description: Spring Boot 3.0 removed the key-based sanitization mechanism used in Spring Boot 2.x in favor of a unified approach. See https://github.com/openrewrite/rewrite-spring/issues/228
tags:
- spring
- boot
recipeList:
- org.openrewrite.java.spring.DeleteSpringProperty:
propertyKey: management.endpoint.configprops.additional-keys-to-sanitize
- org.openrewrite.java.spring.DeleteSpringProperty:
propertyKey: management.endpoint.env.additional-keys-to-sanitize
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.MigrateMaxHttpHeaderSize
displayName: Rename `server.max-http-header-size` to `server.max-http-request-header-size`
description: >
Previously, the server.max-http-header-size was treated inconsistently across the four supported embedded web servers.
When using Jetty, Netty, or Undertow it would configure the max HTTP request header size. When using Tomcat it would
configure the max HTTP request and response header sizes. The renamed property is used to configure the http request
header size in Spring Boot 3.0. **To limit the max header size of an HTTP response on Tomcat or Jetty (the only two
servers that support such a setting), use a `WebServerFactoryCustomizer`**.
tags:
- spring
- boot
recipeList:
- org.openrewrite.java.spring.ChangeSpringPropertyKey:
oldPropertyKey: server.max-http-header-size
newPropertyKey: server.max-http-request-header-size
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
displayName: Migrate thymeleaf dependencies to Spring Boot 3.x
description: Migrate thymeleaf dependencies to the new artifactId, since these are changed with Spring Boot 3.
tags:
- spring
- boot
- thymeleaf
recipeList:
- org.openrewrite.java.ChangePackage:
oldPackageName: org.thymeleaf.spring5
newPackageName: org.thymeleaf.spring6
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
oldGroupId: org.thymeleaf
oldArtifactId: thymeleaf-spring5
newArtifactId: thymeleaf-spring6
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
oldGroupId: org.thymeleaf.extras
oldArtifactId: thymeleaf-extras-springsecurity5
newArtifactId: thymeleaf-extras-springsecurity6
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.UpgradeSpringDoc_2
displayName: Upgrade to springdoc-openapi 2
description: >
Migrate applications to the latest spring-doc 2 release. This recipe will modify an
application's build files and make changes code changes for removed/updated APIs.
See the [upgrade guide](https://springdoc.org/#migrating-from-springdoc-v1)
tags:
- spring
recipeList:
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-data-rest
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-groovy
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-hateoas
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-javadoc
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-kotlin
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-security
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-common
newArtifactId: springdoc-openapi-starter-common
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webmvc-core
newArtifactId: springdoc-openapi-starter-webmvc-api
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webflux-core
newArtifactId: springdoc-openapi-starter-webflux-api
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-ui
newArtifactId: springdoc-openapi-starter-webmvc-ui
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webflux-ui
newArtifactId: springdoc-openapi-starter-webflux-ui
newVersion: 2.x
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.SpringDocUtils
newFullyQualifiedTypeName: org.springdoc.core.utils.SpringDocUtils
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.api.annotations.ParameterObject
newFullyQualifiedTypeName: org.springdoc.core.annotations.ParameterObject
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.GroupedOpenApi
newFullyQualifiedTypeName: org.springdoc.core.models.GroupedOpenApi
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.customizers.OpenApiCustomiser
newFullyQualifiedTypeName: org.springdoc.core.customizers.OpenApiCustomizer
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.Constants
newFullyQualifiedTypeName: org.springdoc.core.utils.Constants
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.SwaggerUiConfigParameters
newFullyQualifiedTypeName: org.springdoc.core.properties.SwaggerUiConfigParameters
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.springdoc.core.models.GroupedOpenApi.Builder addOpenApiCustomiser(..)
newMethodName: addOpenApiCustomizer
matchOverrides: true