From cbbaf42202dfa8687dcddcf392362f35667bc822 Mon Sep 17 00:00:00 2001 From: Ishu Thakur Date: Sun, 9 Oct 2022 02:05:47 +0530 Subject: [PATCH 1/5] adding the jmx endpoint exposure realated files . --- .../Boot_27_30_JmxEndpointExposureAction.java | 29 +++++++++++++++++++ .../JmxEndpointExposureCondition.java | 17 +++++++++++ .../filter/JmxEndpointExposureFinder.java | 21 ++++++++++++++ .../recipes/boot-2.7-3.0-upgrade-report.yaml | 4 +++ 4 files changed, 71 insertions(+) create mode 100644 components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java create mode 100644 components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java create mode 100644 components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java new file mode 100644 index 000000000..d185ac50b --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java @@ -0,0 +1,29 @@ +package org.springframework.sbm.boot.upgrade_27_30.actions; + +import org.springframework.sbm.boot.properties.finder.SpringBootDefaultPropertiesFinder; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.recipe.AbstractAction; + +import java.util.Optional; + +public class Boot_27_30_JmxEndpointExposureAction extends AbstractAction { + + public static final String JMX_ENDPOINT = "management.endpoints.jmx.exposure.include"; + + @Override + public void apply(ProjectContext context) { + SpringBootDefaultPropertiesFinder springBootDefaultPropertiesFinder = new SpringBootDefaultPropertiesFinder(); + + context.getApplicationModules() + .getTopmostApplicationModules() + .stream() + .map(m -> m.searchMainResources(springBootDefaultPropertiesFinder)) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(p -> { + if (!p.getProperty(JMX_ENDPOINT).isPresent()) { + p.setProperty(JMX_ENDPOINT, "*"); + } + }); + } +} diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java new file mode 100644 index 000000000..845567ac0 --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java @@ -0,0 +1,17 @@ +package org.springframework.sbm.boot.upgrade_27_30.conditions; + +import org.springframework.sbm.boot.upgrade_27_30.filter.JmxEndpointExposureFinder; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.recipe.Condition; + +public class JmxEndpointExposureCondition implements Condition { + @Override + public String getDescription() { + return "Check if 'management.endpoints.jmx.exposure.include' is declared."; + } + + @Override + public boolean evaluate(ProjectContext context) { + return context.search(new JmxEndpointExposureFinder()).isEmpty(); + } +} diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java new file mode 100644 index 000000000..369ee71c2 --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java @@ -0,0 +1,21 @@ +package org.springframework.sbm.boot.upgrade_27_30.filter; + +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; +import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFilter; +import org.springframework.sbm.project.resource.ProjectResourceSet; +import org.springframework.sbm.project.resource.filter.ProjectResourceFinder; +import org.springframework.sbm.properties.api.PropertiesSource; + +import java.util.List; + +public class JmxEndpointExposureFinder implements ProjectResourceFinder> { + public static final String JMX_ENDPOINT_KEY = "management.endpoints.jmx.exposure.include"; + + @Override + public List apply(ProjectResourceSet projectResourceSet) { + List springBootApplicationProperties = new SpringBootApplicationPropertiesResourceListFilter().apply(projectResourceSet); + return springBootApplicationProperties.stream() + .filter(find -> find.getProperty(JMX_ENDPOINT_KEY).isPresent()) + .toList(); + } +} diff --git a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml index 9834e8659..8631d7195 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml +++ b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml @@ -17,3 +17,7 @@ description: "Sets logging date format to yyyy-MM-dd HH:mm:ss.SSS" condition: type: org.springframework.sbm.boot.upgrade_27_30.conditions.LoggingDateFormatCondition + - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_JmxEndpointExposureAction + description: "Sets JMX endpoint exposure include to *" + condition: + type: rg.springframework.sbm.boot.upgrade_27_30.conditions.JmxEndpointExposureCondition \ No newline at end of file From 6c2d400c7eaa16d14208bae54f96fb6badc7eaeb Mon Sep 17 00:00:00 2001 From: Ishu Thakur Date: Tue, 18 Oct 2022 18:19:05 +0530 Subject: [PATCH 2/5] minor changes --- .../src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml index 8631d7195..e2d6b7945 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml +++ b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml @@ -20,4 +20,4 @@ - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_JmxEndpointExposureAction description: "Sets JMX endpoint exposure include to *" condition: - type: rg.springframework.sbm.boot.upgrade_27_30.conditions.JmxEndpointExposureCondition \ No newline at end of file + type: org.springframework.sbm.boot.upgrade_27_30.conditions.JmxEndpointExposureCondition \ No newline at end of file From 178250ab78419fc4bc2579044e7fef6b5ce56023 Mon Sep 17 00:00:00 2001 From: Ishu Thakur Date: Sun, 30 Oct 2022 19:34:38 +0530 Subject: [PATCH 3/5] Adding TestProjectContext for the JmxEndpointExposure. --- ...t_27_30_JmxEndpointExposureActionTest.java | 34 ++++++++ .../JmxEndpointExposureConditionTest.java | 44 +++++++++++ .../filter/JmxEndpointExposureFinderTest.java | 78 +++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java create mode 100644 components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java create mode 100644 components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java new file mode 100644 index 000000000..c52d0e117 --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java @@ -0,0 +1,34 @@ +package org.springframework.sbm.boot.upgrade_27_30.actions; + +import org.junit.jupiter.api.Test; +import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; +import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; +import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFilter; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.project.resource.TestProjectContext; + +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +public class Boot_27_30_JmxEndpointExposureActionTest { + private final String DUMMY_PROPERTY_FILE = "foo=bar\n" + + "defaultBasePackage=org.springframework.sbm"; + + @Test + public void givenAProjectWithoutJmxEndpointExposureOverride_andSpringBootProperties_applyAction_expectPropertyAdded() { + ProjectContext projectContext = TestProjectContext.buildProjectContext() + .addRegistrar(new SpringBootApplicationPropertiesRegistrar(new SpringApplicationPropertiesPathMatcher())) + .addProjectResource("src/main/resources/application.properties", DUMMY_PROPERTY_FILE) + .build(); + + Boot_27_30_JmxEndpointExposureAction boot_27_30_jmxEndpointExposureAction = new Boot_27_30_JmxEndpointExposureAction(); + boot_27_30_jmxEndpointExposureAction.apply(projectContext); + + List bootApplicationProperties = new SpringBootApplicationPropertiesResourceListFilter().apply(projectContext.getProjectResources()); + assertThat(bootApplicationProperties.size()).isEqualTo(1); + assertThat(bootApplicationProperties.get(0).getProperty("management.endpoints.jmx.exposure.include").isPresent()).isTrue(); + + } +} diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java new file mode 100644 index 000000000..2230ed3f5 --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java @@ -0,0 +1,44 @@ +package org.springframework.sbm.boot.upgrade_27_30.conditions; + +import org.junit.jupiter.api.Test; +import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; +import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.project.resource.TestProjectContext; + +import java.nio.file.Path; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +public class JmxEndpointExposureConditionTest { + + private static final String APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED = "foo=bar\n" + + "migrate=true\n" + + "management.endpoints.jmx.exposure.include=*\n"; + + private static final String APPLICATION_PROPERTIES_WITHOUT_JMX_ENDPOINT_EXPOSED = "foo=bar\n" + + "migrate=true\n"; + + @Test + public void givenProjectWithJmxEndpointExposureCustomization_evaluateCondition_expectFalse() { + ProjectContext projectContext = TestProjectContext.buildProjectContext() + .addRegistrar(new SpringBootApplicationPropertiesRegistrar(new SpringApplicationPropertiesPathMatcher())) + .addProjectResource(Path.of("src", "main", "resources", "application.properties"), APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED) + .build(); + + JmxEndpointExposureCondition jmxEndpointExposureCondition = new JmxEndpointExposureCondition(); + assertThat(jmxEndpointExposureCondition.evaluate(projectContext)).isFalse(); + } + + @Test + public void givenProjectWithJmxEndpointExposureCustomization_evaluateCondition_expectTrue() { + ProjectContext projectContext = TestProjectContext.buildProjectContext() + .addRegistrar(new SpringBootApplicationPropertiesRegistrar(new SpringApplicationPropertiesPathMatcher())) + .addProjectResource(Path.of("src", "main", "resources", "application.properties"), APPLICATION_PROPERTIES_WITHOUT_JMX_ENDPOINT_EXPOSED) + .build(); + + JmxEndpointExposureCondition jmxEndpointExposureCondition = new JmxEndpointExposureCondition(); + assertThat(jmxEndpointExposureCondition.evaluate(projectContext)).isTrue(); + } + +} diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java new file mode 100644 index 000000000..7e1453dce --- /dev/null +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java @@ -0,0 +1,78 @@ +package org.springframework.sbm.boot.upgrade_27_30.filter; + +import org.junit.jupiter.api.Test; +import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; +import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.project.resource.TestProjectContext; +import org.springframework.sbm.properties.api.PropertiesSource; + +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +public class JmxEndpointExposureFinderTest { + private static final String APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED = "foo=bar\n" + + "migrate=true\n" + + "management.endpoints.jmx.exposure.include=*\n"; + + private static final String MULTI_MODULE_POM_XML = "\n" + + " 4.0.0\n" + + "\n" + + " org.springframework.sbm\n" + + " spring-boot-migrator\n" + + " 0.11.2-SNAPSHOT\n" + + " pom\n" + + " \n" + + " module1\n" + + " module2\n" + + " \n" + + ""; + + private static final String SUB_MODULE_POM_XML = "\n" + + " \n" + + " spring-boot-migrator\n" + + " org.springframework.sbm\n" + + " 0.11.2-SNAPSHOT\n" + + " ../../pom.xml\n" + + " \n" + + " 4.0.0\n" + + "\n" + + " {{module}}\n" + + ""; + @Test + public void givenProjectWithJmxEndpointExposureCustomization_findResources_returnResource(){ + ProjectContext projectContext = TestProjectContext.buildProjectContext() + .addRegistrar(new SpringBootApplicationPropertiesRegistrar(new SpringApplicationPropertiesPathMatcher())) + .addProjectResource(Path.of("src", "main", "resources", "application.properties"), APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED) + .build(); + + JmxEndpointExposureFinder jmxEndpointExposureFinder = new JmxEndpointExposureFinder(); + List propertiesSources = jmxEndpointExposureFinder.apply(projectContext.getProjectResources()); + + assertThat(propertiesSources.size()).isEqualTo(1); + assertThat(propertiesSources.get(0).getProperty("management.endpoints.jmx.exposure.include").isPresent()).isTrue(); + } + + @Test + public void givenMultiModuleProjectWithJmxEndpointExposureCustomization_findResources_returnResource(){ + ProjectContext projectContext = TestProjectContext.buildProjectContext() + .withMavenRootBuildFileSource(MULTI_MODULE_POM_XML) + .addProjectResource(Path.of("module1","pom.xml"),SUB_MODULE_POM_XML.replace("{{module}}", "module1")) + .addProjectResource(Path.of("module2","pom.xml"),SUB_MODULE_POM_XML.replace("{{module}}", "module2")) + .addRegistrar(new SpringBootApplicationPropertiesRegistrar(new SpringApplicationPropertiesPathMatcher())) + .addProjectResource(Path.of("module1","src", "main", "resources", "application.properties"), APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED) + .addProjectResource(Path.of("module2","src", "main", "resources", "application.properties"), APPLICATION_PROPERTIES_WITH_JMX_ENDPOINT_EXPOSED) + .build(); + + JmxEndpointExposureFinder jmxEndpointExposureFinder = new JmxEndpointExposureFinder(); + List propertiesSources = jmxEndpointExposureFinder.apply(projectContext.getProjectResources()); + + assertThat(propertiesSources.size()).isEqualTo(2); + assertThat(propertiesSources.get(0).getProperty("management.endpoints.jmx.exposure.include").isPresent()).isTrue(); + assertThat(propertiesSources.get(1).getProperty("management.endpoints.jmx.exposure.include").isPresent()).isTrue(); + } +} From 38972068ff4af5989c4b2eb08da702a6c30ee2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Kr=C3=BCger?= Date: Thu, 3 Nov 2022 22:34:50 +0100 Subject: [PATCH 4/5] merging changes from main --- .../sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java | 3 ++- .../recipes/boot-2.7-3.0-dependency-version-update.yaml | 7 ++++++- .../resources/recipes/boot-2.7-3.0-upgrade-report.yaml | 6 +----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java index de35cd352..09f7542c2 100644 --- a/applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java @@ -174,7 +174,8 @@ private void verifyPropertyConfigurationUpdate() { "spring.cassandra.request.timeout=10s\n" + "spring.cassandra.connection.connect-timeout=10s\n" + "spring.cassandra.connection.init-query-timeout=10s\n" + - "logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS\n"); + "logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS\n" + + "management.endpoints.jmx.exposure.include=*\n"); } private void verifyEhCacheVersionIsUpgraded() { diff --git a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml index 4782003af..1e16b709c 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml +++ b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml @@ -693,10 +693,15 @@ condition: type: org.springframework.sbm.boot.upgrade_27_30.conditions.LoggingDateFormatCondition addDefaultPropertiesFileToTopModules: true - - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_AddLoggingDateFormat + - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_AddLoggingDateFormat description: "Sets logging date format to yyyy-MM-dd HH:mm:ss.SSS" condition: type: org.springframework.sbm.boot.upgrade_27_30.conditions.LoggingDateFormatCondition + - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_JmxEndpointExposureAction + description: "Sets JMX endpoint exposure include to *" + condition: + type: org.springframework.sbm.boot.upgrade_27_30.conditions.JmxEndpointExposureCondition + diff --git a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml index e2d6b7945..b8480800b 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml +++ b/components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-upgrade-report.yaml @@ -16,8 +16,4 @@ - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_AddLoggingDateFormat description: "Sets logging date format to yyyy-MM-dd HH:mm:ss.SSS" condition: - type: org.springframework.sbm.boot.upgrade_27_30.conditions.LoggingDateFormatCondition - - type: org.springframework.sbm.boot.upgrade_27_30.actions.Boot_27_30_JmxEndpointExposureAction - description: "Sets JMX endpoint exposure include to *" - condition: - type: org.springframework.sbm.boot.upgrade_27_30.conditions.JmxEndpointExposureCondition \ No newline at end of file + type: org.springframework.sbm.boot.upgrade_27_30.conditions.LoggingDateFormatCondition \ No newline at end of file From 4a54c44e6f4012500951c52dea063fd567ae6f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Kr=C3=BCger?= Date: Thu, 3 Nov 2022 16:50:04 +0100 Subject: [PATCH 5/5] Add missing copyright license --- .../Boot_27_30_JmxEndpointExposureAction.java | 15 +++++++++++++++ .../conditions/JmxEndpointExposureCondition.java | 15 +++++++++++++++ .../filter/JmxEndpointExposureFinder.java | 15 +++++++++++++++ .../Boot_27_30_JmxEndpointExposureActionTest.java | 15 +++++++++++++++ .../JmxEndpointExposureConditionTest.java | 15 +++++++++++++++ .../filter/JmxEndpointExposureFinderTest.java | 15 +++++++++++++++ 6 files changed, 90 insertions(+) diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java index d185ac50b..68d62286b 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureAction.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.actions; import org.springframework.sbm.boot.properties.finder.SpringBootDefaultPropertiesFinder; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java index 845567ac0..a2cfdde01 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureCondition.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.conditions; import org.springframework.sbm.boot.upgrade_27_30.filter.JmxEndpointExposureFinder; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java index 369ee71c2..024303584 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.filter; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java index c52d0e117..41bce26ba 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.actions; import org.junit.jupiter.api.Test; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java index 2230ed3f5..4b3e47a20 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.conditions; import org.junit.jupiter.api.Test; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java index 7e1453dce..c57a57177 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2021 - 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. + */ package org.springframework.sbm.boot.upgrade_27_30.filter; import org.junit.jupiter.api.Test;