diff --git a/src/main/resources/META-INF/rewrite/best-practices.yml b/src/main/resources/META-INF/rewrite/best-practices.yml index 77a1b80a4..2cb9803e5 100644 --- a/src/main/resources/META-INF/rewrite/best-practices.yml +++ b/src/main/resources/META-INF/rewrite/best-practices.yml @@ -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 @@ -26,6 +43,7 @@ recipeList: - 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 diff --git a/src/main/resources/META-INF/rewrite/spring-boot-20.yml b/src/main/resources/META-INF/rewrite/spring-boot-20.yml index 9d86dd617..acbeee759 100644 --- a/src/main/resources/META-INF/rewrite/spring-boot-20.yml +++ b/src/main/resources/META-INF/rewrite/spring-boot-20.yml @@ -168,18 +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