diff --git a/spring-boot-modules/spring-boot-properties/src/main/resources/configForDbProperties.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/configForDbProperties.xml new file mode 100644 index 0000000000..00fd5f0508 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/resources/configForDbProperties.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml index 4468bb485f..bf4452da4a 100644 --- a/spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml +++ b/spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml @@ -7,7 +7,8 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd" > - + + diff --git a/spring-boot-modules/spring-boot-properties/src/main/resources/database.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/database.properties index 6524ce6109..eb5703ca72 100644 --- a/spring-boot-modules/spring-boot-properties/src/main/resources/database.properties +++ b/spring-boot-modules/spring-boot-properties/src/main/resources/database.properties @@ -1,4 +1,5 @@ -database.url=jdbc:postgresql:/localhost:5432/instance + +jdbc.url=jdbc:postgresql:/localhost:5432 database.username=foo database.password=bar -jdbc.url=jdbc:postgresql:/localhost:5432 \ No newline at end of file + diff --git a/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java index 6827ee1cf1..2150d4b3ec 100644 --- a/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java +++ b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java @@ -6,7 +6,7 @@ import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import static org.assertj.core.api.Assertions.assertThat; -@SpringJUnitConfig(locations = "classpath:configForProperties.xml") +@SpringJUnitConfig(locations = {"classpath:configForProperties.xml", "classpath:configForDbProperties.xml"}) public class MultiplePropertiesXmlConfigIntegrationTest { @Value("${key.something}") private String something;