Skip to content

Commit

Permalink
Remove BeanMethodsNotPublic from SpringBoot2BestPractices (again) (#645)
Browse files Browse the repository at this point in the history
* Remove BeanMethodsNotPublic from SpringBoot2BestPractices (again)

see #304

* Move the 2.x best practices to best-practices.yml as well

---------

Co-authored-by: Tim te Beek <[email protected]>
  • Loading branch information
nmck257 and timtebeek authored Dec 6, 2024
1 parent 6738e13 commit 7a5c362
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
19 changes: 19 additions & 0 deletions src/main/resources/META-INF/rewrite/best-practices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
# 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.boot2.SpringBoot2BestPractices
displayName: Spring Boot 2.x best practices
description: Applies best practices to Spring Boot 2 applications.
tags:
- spring
- boot
recipeList:
# Note that we do not upgrade to Spring Boot 2.x here, as the 2.0 recipe includes SpringBoot2BestPractices itself
- org.openrewrite.java.spring.NoRequestMappingAnnotation
- org.openrewrite.java.spring.ImplicitWebAnnotationNames
- org.openrewrite.java.spring.boot2.UnnecessarySpringExtension
- org.openrewrite.java.spring.NoAutowiredOnConstructor
- org.openrewrite.java.spring.boot2.RestTemplateBuilderRequestFactory
- org.openrewrite.java.spring.boot2.ReplaceDeprecatedEnvironmentTestUtils

---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.SpringBoot3BestPractices
Expand All @@ -22,10 +39,12 @@ tags:
- spring
- boot
recipeList:
# These steps go above & beyond what's needed for a pure upgrade, and are not be included with 3.x upgrades themselves
- org.openrewrite.java.spring.boot2.SpringBoot2BestPractices
- org.openrewrite.java.migrate.UpgradeToJava21 # Allows for virtual threads
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
- org.openrewrite.java.spring.boot3.EnableVirtualThreads
- org.openrewrite.java.spring.framework.BeanMethodsNotPublic # Intentionally not in 2.x
# Replace literals with constants and simplify MediaType parse calls
- org.openrewrite.java.spring.http.ReplaceStringLiteralsWithHttpHeadersConstants
- org.openrewrite.java.spring.http.ReplaceStringLiteralsWithMediaTypeConstants
Expand Down
16 changes: 0 additions & 16 deletions src/main/resources/META-INF/rewrite/spring-boot-20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,3 @@ recipeList:
artifactId: validation-api
version: 2.x
onlyIfUsing: org.hibernate.validator.constraints.*
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot2.SpringBoot2BestPractices
displayName: Spring Boot 2.x best practices
description: Applies best practices to Spring Boot 2 applications.
tags:
- spring
- boot
recipeList:
- org.openrewrite.java.spring.NoRequestMappingAnnotation
- org.openrewrite.java.spring.ImplicitWebAnnotationNames
- org.openrewrite.java.spring.boot2.UnnecessarySpringExtension
- org.openrewrite.java.spring.NoAutowiredOnConstructor
- org.openrewrite.java.spring.boot2.RestTemplateBuilderRequestFactory
- org.openrewrite.java.spring.boot2.ReplaceDeprecatedEnvironmentTestUtils
- org.openrewrite.java.spring.framework.BeanMethodsNotPublic

0 comments on commit 7a5c362

Please sign in to comment.