From 75b533efe982d040f1851f1d6760126efd3f8b65 Mon Sep 17 00:00:00 2001 From: eugenp Date: Sat, 15 Aug 2015 18:08:40 +0300 Subject: [PATCH] perperties work --- .../spring/PropertiesWithXmlConfigTwo.java | 14 -------------- ...tiesTwo.xml => basicConfigForPropertiesTwo.xml} | 0 .../src/main/resources/springScheduled-config.xml | 6 +++--- .../PropertiesWithMultipleXmlsIntegrationTest.java | 7 ++----- .../PropertiesWithXmlIntegrationTest.java | 6 ++---- .../ExternalPropertiesWithJavaIntegrationTest.java | 2 +- ...lPropertiesWithMultipleXmlsIntegrationTest.java | 2 +- .../ExternalPropertiesWithXmlIntegrationTest.java | 2 +- .../org/baeldung/test/IntegrationTestSuite.java | 10 +++++----- 9 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithXmlConfigTwo.java rename spring-all/src/main/resources/{configForPropertiesTwo.xml => basicConfigForPropertiesTwo.xml} (100%) rename spring-all/src/test/java/org/baeldung/properties/{core => basic}/PropertiesWithMultipleXmlsIntegrationTest.java (67%) rename spring-all/src/test/java/org/baeldung/properties/{core => basic}/PropertiesWithXmlIntegrationTest.java (73%) rename spring-all/src/test/java/org/baeldung/properties/{core => external}/ExternalPropertiesWithJavaIntegrationTest.java (97%) rename spring-all/src/test/java/org/baeldung/properties/{core => external}/ExternalPropertiesWithMultipleXmlsIntegrationTest.java (97%) rename spring-all/src/test/java/org/baeldung/properties/{core => external}/ExternalPropertiesWithXmlIntegrationTest.java (97%) diff --git a/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithXmlConfigTwo.java b/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithXmlConfigTwo.java deleted file mode 100644 index e4365cbc8b..0000000000 --- a/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithXmlConfigTwo.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.baeldung.properties.spring; - -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ImportResource; - -@Configuration -@ImportResource("classpath:configForPropertiesTwo.xml") -public class PropertiesWithXmlConfigTwo { - - public PropertiesWithXmlConfigTwo() { - super(); - } - -} \ No newline at end of file diff --git a/spring-all/src/main/resources/configForPropertiesTwo.xml b/spring-all/src/main/resources/basicConfigForPropertiesTwo.xml similarity index 100% rename from spring-all/src/main/resources/configForPropertiesTwo.xml rename to spring-all/src/main/resources/basicConfigForPropertiesTwo.xml diff --git a/spring-all/src/main/resources/springScheduled-config.xml b/spring-all/src/main/resources/springScheduled-config.xml index 751b25470d..65566ee779 100644 --- a/spring-all/src/main/resources/springScheduled-config.xml +++ b/spring-all/src/main/resources/springScheduled-config.xml @@ -2,9 +2,9 @@ diff --git a/spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithMultipleXmlsIntegrationTest.java b/spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java similarity index 67% rename from spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithMultipleXmlsIntegrationTest.java rename to spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java index 9fc793fc1b..eddadd2aeb 100644 --- a/spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithMultipleXmlsIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java @@ -1,7 +1,5 @@ -package org.baeldung.properties.core; +package org.baeldung.properties.basic; -import org.baeldung.properties.spring.PropertiesWithXmlConfigOne; -import org.baeldung.properties.spring.PropertiesWithXmlConfigTwo; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -9,10 +7,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { PropertiesWithXmlConfigOne.class, PropertiesWithXmlConfigTwo.class }, loader = AnnotationConfigContextLoader.class) +@ContextConfiguration(locations = { "classpath:configForPropertiesOne.xml", "classpath:basicConfigForPropertiesTwo.xml" }) public class PropertiesWithMultipleXmlsIntegrationTest { @Autowired diff --git a/spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithXmlIntegrationTest.java b/spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java similarity index 73% rename from spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithXmlIntegrationTest.java rename to spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java index ff5eaab910..5e7689a2d9 100644 --- a/spring-all/src/test/java/org/baeldung/properties/core/PropertiesWithXmlIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java @@ -1,6 +1,5 @@ -package org.baeldung.properties.core; +package org.baeldung.properties.basic; -import org.baeldung.properties.spring.PropertiesWithXmlConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -8,10 +7,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { PropertiesWithXmlConfig.class }, loader = AnnotationConfigContextLoader.class) +@ContextConfiguration(locations = "classpath:basicConfigForProperties.xml") public class PropertiesWithXmlIntegrationTest { @Autowired diff --git a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithJavaIntegrationTest.java b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java similarity index 97% rename from spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithJavaIntegrationTest.java rename to spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java index 1cf9c774f4..880f9d0c54 100644 --- a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithJavaIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.properties.core; +package org.baeldung.properties.external; import org.baeldung.properties.spring.PropertiesWithJavaConfig; import org.baeldung.properties.spring.PropertiesWithJavaConfigOther; diff --git a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithMultipleXmlsIntegrationTest.java b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java similarity index 97% rename from spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithMultipleXmlsIntegrationTest.java rename to spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java index 98654ee4b6..660bd9bc4e 100644 --- a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithMultipleXmlsIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.properties.core; +package org.baeldung.properties.external; import org.baeldung.properties.spring.PropertiesWithXmlConfigOne; import org.baeldung.properties.spring.PropertiesWithXmlConfigTwo; diff --git a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithXmlIntegrationTest.java b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithXmlIntegrationTest.java similarity index 97% rename from spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithXmlIntegrationTest.java rename to spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithXmlIntegrationTest.java index b77aac63d8..4a111a04dd 100644 --- a/spring-all/src/test/java/org/baeldung/properties/core/ExternalPropertiesWithXmlIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/properties/external/ExternalPropertiesWithXmlIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.properties.core; +package org.baeldung.properties.external; import org.baeldung.properties.spring.PropertiesWithXmlConfig; import org.junit.Ignore; diff --git a/spring-all/src/test/java/org/baeldung/test/IntegrationTestSuite.java b/spring-all/src/test/java/org/baeldung/test/IntegrationTestSuite.java index 86ec917bd6..d574ad2356 100644 --- a/spring-all/src/test/java/org/baeldung/test/IntegrationTestSuite.java +++ b/spring-all/src/test/java/org/baeldung/test/IntegrationTestSuite.java @@ -1,11 +1,11 @@ package org.baeldung.test; -import org.baeldung.properties.core.ExternalPropertiesWithJavaIntegrationTest; -import org.baeldung.properties.core.ExternalPropertiesWithMultipleXmlsIntegrationTest; -import org.baeldung.properties.core.ExternalPropertiesWithXmlIntegrationTest; +import org.baeldung.properties.basic.PropertiesWithMultipleXmlsIntegrationTest; +import org.baeldung.properties.basic.PropertiesWithXmlIntegrationTest; import org.baeldung.properties.core.PropertiesWithJavaIntegrationTest; -import org.baeldung.properties.core.PropertiesWithMultipleXmlsIntegrationTest; -import org.baeldung.properties.core.PropertiesWithXmlIntegrationTest; +import org.baeldung.properties.external.ExternalPropertiesWithJavaIntegrationTest; +import org.baeldung.properties.external.ExternalPropertiesWithMultipleXmlsIntegrationTest; +import org.baeldung.properties.external.ExternalPropertiesWithXmlIntegrationTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses;