diff --git a/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java index d095278a9..97eefb4ce 100644 --- a/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java +++ b/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/PrefsInitializer.java @@ -52,7 +52,7 @@ public class PrefsInitializer extends AbstractPreferenceInitializer { "org.openrewrite.java.testing.junit5.JUnit5BestPractices", "org.openrewrite.java.testing.junit5.JUnit4to5Migration", "org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_6", - "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0", + "org.springframework.sts.java.spring.boot3.UpgradeSpringBoot_3_0", "org.rewrite.java.security.*", "org.springframework.rewrite.test.*", "rewrite.test.*" diff --git a/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/upgrade-boot3.yml b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/upgrade-boot3.yml new file mode 100644 index 000000000..fa60fab8b --- /dev/null +++ b/headless-services/commons/commons-rewrite/src/main/resources/META-INF/rewrite/upgrade-boot3.yml @@ -0,0 +1,33 @@ +# +# Copyright 2022 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. +# +--- +######################################################################################################################## +# SpringBoot 3_0 +type: specs.openrewrite.org/v1beta/recipe +name: org.springframework.sts.java.spring.boot3.UpgradeSpringBoot_3_0 +displayName: Upgrade to Spring Boot 3.0 from 2.7 +description: 'Upgrade to Spring Boot 3.0 from prior 2.x version.' +recipeList: + - org.openrewrite.maven.AddRepository: + id: spring-snapshots + url: https://repo.spring.io/snapshot + snapshotsEnabled: true + - org.openrewrite.maven.AddRepository: + id: spring-milestones + url: https://repo.spring.io/milestone + snapshotsEnabled: false + - org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0 +--- diff --git a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessConnectorService.java b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessConnectorService.java index 0c5dfc3bf..7ac5a83c2 100644 --- a/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessConnectorService.java +++ b/headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/livehover/v2/SpringProcessConnectorService.java @@ -31,6 +31,7 @@ public class SpringProcessConnectorService { private static final String METRICS = "metrics"; public static final String GC_PAUSES = "gcPauses"; + public static final String MEMORY = "memory"; public static final String HEAP_MEMORY = "heapMemory"; public static final String NON_HEAP_MEMORY = "nonHeapMemory"; @@ -176,7 +177,7 @@ public class SpringProcessConnectorService { progressTask.progressDone(); refreshProcess(new SpringProcessParams(processKey, "", "", "")); - refreshProcess(new SpringProcessParams(processKey, METRICS, HEAP_MEMORY, "area:heap")); + refreshProcess(new SpringProcessParams(processKey, METRICS, MEMORY, "")); refreshProcess(new SpringProcessParams(processKey, METRICS, GC_PAUSES, "")); } catch (Exception e) { @@ -237,7 +238,7 @@ public class SpringProcessConnectorService { try { progressTask.progressEvent(progressMessage); - if(METRICS.equals(endpoint) && (HEAP_MEMORY.equals(metricName) || NON_HEAP_MEMORY.equals(metricName))) { + if(METRICS.equals(endpoint) && (MEMORY.equals(metricName))) { SpringProcessMemoryMetricsLiveData newMetricsLiveData = connector.refreshMemoryMetrics(this.liveDataProvider.getCurrent(processKey), metricName, springProcessParams.getTags()); if (newMetricsLiveData != null) { diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json index 1c2a5b143..74d273193 100644 --- a/vscode-extensions/vscode-spring-boot/package.json +++ b/vscode-extensions/vscode-spring-boot/package.json @@ -218,7 +218,7 @@ "org.openrewrite.java.testing.junit5.JUnit5BestPractices", "org.openrewrite.java.testing.junit5.JUnit4to5Migration", "org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_6", - "org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0", + "org.springframework.sts.java.spring.boot3.UpgradeSpringBoot_3_0", "org.rewrite.java.security.*", "org.springframework.rewrite.test.*", "rewrite.test.*"