diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties index c2bb5deb45..a079837942 100644 --- a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.properties @@ -11,6 +11,7 @@ app.name=MyApp app.description=${app.name} is a Spring Boot application logging.file.name=myapplication.log bael.property=defaultValue +bael.otherProperty=defaultOtherValue #--- spring.config.activate.on-profile=multidocument-dev spring.datasource.password=password @@ -18,6 +19,9 @@ spring.datasource.url=jdbc:h2:dev spring.datasource.username=SA bael.property=devValue #--- +spring.config.activate.on-profile=multidocument-integration-extension +bael.otherProperty=integrationExtensionOtherValue +#--- spring.config.activate.on-profile=multidocument-prod spring.datasource.password=password spring.datasource.url=jdbc:h2:prod diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml index 33aabb2459..10570bb738 100644 --- a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml +++ b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml @@ -1,5 +1,9 @@ bael: root-level-property: defaultRootLevelValue +spring: + profiles: + group: + multidocument-integration: multidocument-integration-extension --- spring: config: diff --git a/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/IntegrationMultidocumentFilesIntegrationTest.java b/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/IntegrationMultidocumentFilesIntegrationTest.java index f7968f51ad..e0727154d0 100644 --- a/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/IntegrationMultidocumentFilesIntegrationTest.java +++ b/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/IntegrationMultidocumentFilesIntegrationTest.java @@ -17,12 +17,16 @@ public class IntegrationMultidocumentFilesIntegrationTest { @Value("${bael.property}") private String baelCustomProperty; + @Value("${bael.otherProperty}") + private String baelCustomOtherProperty; + @Value("${bael.root-level-property}") private String baelRootProperty; @Test public void givenProductionProfileActive_whenApplicationStarts_thenDefaultPropertiesUser() { assertThat(baelCustomProperty).isEqualTo("integrationValue"); + assertThat(baelCustomOtherProperty).isEqualTo("integrationExtensionOtherValue"); assertThat(baelRootProperty).isEqualTo("defaultRootLevelValue"); } } diff --git a/spring-cloud/spring-cloud-config/client/pom.xml b/spring-cloud/spring-cloud-config/client/pom.xml index 805a50bfdb..2400520d2b 100644 --- a/spring-cloud/spring-cloud-config/client/pom.xml +++ b/spring-cloud/spring-cloud-config/client/pom.xml @@ -1,7 +1,7 @@ + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 client client @@ -26,6 +26,17 @@ spring-boot-starter-test test + + org.junit.vintage + junit-vintage-engine + test + + + org.hamcrest + hamcrest-core + + + diff --git a/spring-cloud/spring-cloud-config/pom.xml b/spring-cloud/spring-cloud-config/pom.xml index 5db18a7245..bfe17044e0 100644 --- a/spring-cloud/spring-cloud-config/pom.xml +++ b/spring-cloud/spring-cloud-config/pom.xml @@ -33,8 +33,7 @@ - Hoxton.SR4 - 2.3.3.RELEASE + 2020.0.0 diff --git a/spring-cloud/spring-cloud-config/server/pom.xml b/spring-cloud/spring-cloud-config/server/pom.xml index e32a473cd6..f0f1e43612 100644 --- a/spring-cloud/spring-cloud-config/server/pom.xml +++ b/spring-cloud/spring-cloud-config/server/pom.xml @@ -1,11 +1,11 @@ + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 server server - + com.baeldung.spring.cloud spring-cloud-config @@ -30,6 +30,17 @@ spring-boot-starter-test test + + org.junit.vintage + junit-vintage-engine + test + + + org.hamcrest + hamcrest-core + + +