-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipe for springboot 3.4 migration
- Loading branch information
1 parent
f487605
commit acb6400
Showing
3 changed files
with
82 additions
and
18 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/main/resources/META-INF/rewrite/spring-boot-3-best-practices.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Copyright 2024 the original author or authors. | ||
# <p> | ||
# 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 | ||
# <p> | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# <p> | ||
# 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.SpringBoot3BestPractices | ||
displayName: Spring Boot 3.x best practices | ||
description: Applies best practices to Spring Boot 3 applications. | ||
tags: | ||
- spring | ||
- boot | ||
recipeList: | ||
- org.openrewrite.java.spring.boot2.SpringBoot2BestPractices | ||
- org.openrewrite.java.migrate.UpgradeToJava21 # Allows for virtual threads | ||
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4 | ||
# Replace literals with constants and simplify MediaType parse calls | ||
- org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants | ||
- org.openrewrite.java.spring.http.ReplaceStringLiteralsWithMediaTypeConstants | ||
- org.openrewrite.java.spring.http.SimplifyMediaTypeParseCalls | ||
- org.openrewrite.java.spring.http.SimplifyWebTestClientCalls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Copyright 2024 the original author or authors. | ||
# <p> | ||
# 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 | ||
# <p> | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# <p> | ||
# 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_4 | ||
displayName: Migrate to Spring Boot 3.4 | ||
description: >- | ||
Migrate applications to the latest Spring Boot 3.4 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 3.3. | ||
tags: | ||
- spring | ||
- boot | ||
recipeList: | ||
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3 | ||
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4 | ||
- org.openrewrite.java.dependencies.UpgradeDependencyVersion: | ||
groupId: org.springframework.boot | ||
artifactId: "*" | ||
newVersion: 3.4.x | ||
overrideManagedVersion: false | ||
- org.openrewrite.maven.UpgradePluginVersion: | ||
groupId: org.springframework.boot | ||
artifactId: spring-boot-maven-plugin | ||
newVersion: 3.4.x | ||
# - org.openrewrite.java.dependencies.UpgradeDependencyVersion: | ||
# groupId: org.springframework | ||
# artifactId: "*" | ||
# newVersion: 6.2.x <- Does not exist yet, but probably required? | ||
- org.openrewrite.maven.UpgradeParentVersion: | ||
groupId: org.springframework.boot | ||
artifactId: spring-boot-starter-parent | ||
newVersion: 3.4.x | ||
- org.openrewrite.gradle.plugins.UpgradePluginVersion: | ||
pluginIdPattern: org.springframework.boot | ||
newVersion: 3.4.x |