diff --git a/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/prefs/PrefsInitializer.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/prefs/PrefsInitializer.java index 7192879f0..0fb3fb0ca 100644 --- a/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/prefs/PrefsInitializer.java +++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/prefs/PrefsInitializer.java @@ -51,8 +51,8 @@ public class PrefsInitializer extends AbstractPreferenceInitializer { "org.openrewrite.java.testing.junit5.JUnit5BestPractices", "org.openrewrite.java.testing.junit5.JUnit4to5Migration", "org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_7", - "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3", "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_4", + "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_5", "org.rewrite.java.security.*", "org.springframework.rewrite.test.*", "rewrite.test.*" diff --git a/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/UpgradeSpringBoot_3_5.yml b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/UpgradeSpringBoot_3_5.yml new file mode 100644 index 000000000..858cdedac --- /dev/null +++ b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/UpgradeSpringBoot_3_5.yml @@ -0,0 +1,46 @@ +# +# Copyright 2024 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.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_5 +displayName: Migrate to Spring Boot 3.5 +description: >- + Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an + application's build files and migrate configuration settings that have + changes between versions. +tags: + - spring + - boot +recipeList: + - org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_4 + - org.openrewrite.java.spring.boot3.SpringBootProperties_3_5 + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: org.springframework.boot + artifactId: "*" + newVersion: 3.5.x + overrideManagedVersion: false + - org.openrewrite.maven.UpgradePluginVersion: + groupId: org.springframework.boot + artifactId: spring-boot-maven-plugin + newVersion: 3.5.x + - org.openrewrite.maven.UpgradeParentVersion: + groupId: org.springframework.boot + artifactId: spring-boot-starter-parent + newVersion: 3.5.x + - org.openrewrite.gradle.plugins.UpgradePluginVersion: + pluginIdPattern: org.springframework.boot + newVersion: 3.5.x + diff --git a/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/spring-boot-35-properties.yml b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/spring-boot-35-properties.yml new file mode 100644 index 000000000..d95c8d77b --- /dev/null +++ b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/spring-boot-35-properties.yml @@ -0,0 +1,94 @@ +# This file is automatically generated by the GeneratePropertiesMigratorConfiguration class. +# Do not edit this file manually. Update the Spring Boot property metadata upstream instead. +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.java.spring.boot3.SpringBootProperties_3_5 +displayName: Migrate Spring Boot properties to 3.5 +description: Migrate properties found in `application.properties` and `application.yml`. +tags: + - spring + - boot +recipeList: + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: management.promethus.metrics.export.pushgateway.base-url + newPropertyKey: management.prometheus.metrics.export.pushgateway.address + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.codec.log-request-details + newPropertyKey: spring.http.codec.log-request-details + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.codec.max-in-memory-size + newPropertyKey: spring.http.codec.max-in-memory-size + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.graphql.path + newPropertyKey: spring.graphql.http.path + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.graphql.sse.timeout + newPropertyKey: spring.graphql.http.sse.timeout + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.auto-escape + newPropertyKey: spring.groovy.template.auto-escape + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.auto-indent + newPropertyKey: spring.groovy.template.auto-indent + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.auto-indent-string + newPropertyKey: spring.groovy.template.auto-indent-string + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.auto-new-line + newPropertyKey: spring.groovy.template.auto-new-line + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.base-template-class + newPropertyKey: spring.groovy.template.base-template-class + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.cache-templates + newPropertyKey: spring.groovy.template.cache + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.declaration-encoding + newPropertyKey: spring.groovy.template.declaration-encoding + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.expand-empty-elements + newPropertyKey: spring.groovy.template.expand-empty-elements + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.locale + newPropertyKey: spring.groovy.template.locale + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.new-line-string + newPropertyKey: spring.groovy.template.new-line-string + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.resource-loader-path + newPropertyKey: spring.groovy.template.resource-loader-path + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.groovy.template.configuration.use-double-quotes + newPropertyKey: spring.groovy.template.use-double-quotes + - org.openrewrite.java.spring.ChangeSpringPropertyKey: + oldPropertyKey: spring.mvc.converters.preferred-json-mapper + newPropertyKey: spring.http.converters.preferred-json-mapper + + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.access-token + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.batch-size + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.connect-timeout + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.enabled + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.published-histogram-type + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.read-timeout + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.source + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.step + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + - org.openrewrite.java.spring.CommentOutSpringPropertyKey: + propertyKey: management.signalfx.metrics.export.uri + comment: "This property is deprecated: Deprecated in Micrometer 1.15.0" + diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/rewrite/SpringBootUpgrade.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/rewrite/SpringBootUpgrade.java index a97f570d6..895f2c648 100644 --- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/rewrite/SpringBootUpgrade.java +++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/rewrite/SpringBootUpgrade.java @@ -52,6 +52,7 @@ public class SpringBootUpgrade { versionsToRecipeId.put("3.2", "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2"); versionsToRecipeId.put("3.3", "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3"); versionsToRecipeId.put("3.4", "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_4"); + versionsToRecipeId.put("3.5", "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_5"); } public SpringBootUpgrade(SimpleLanguageServer server, RewriteRecipeRepository recipeRepo, JavaProjectFinder projectFinder) { diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json index 5c21d2c25..f9a917ff3 100644 --- a/vscode-extensions/vscode-spring-boot/package.json +++ b/vscode-extensions/vscode-spring-boot/package.json @@ -467,8 +467,8 @@ "org.openrewrite.java.testing.junit5.JUnit5BestPractices", "org.openrewrite.java.testing.junit5.JUnit4to5Migration", "org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_7", - "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3", "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_4", + "org.springframework.ide.vscode.rewrite.boot3.UpgradeSpringBoot_3_5", "org.rewrite.java.security.*", "org.springframework.rewrite.test.*", "rewrite.test.*"