perperties work

This commit is contained in:
eugenp 2015-08-15 18:08:40 +03:00
parent 556b7ca886
commit 75b533efe9
9 changed files with 15 additions and 34 deletions

View File

@ -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();
}
}

View File

@ -2,9 +2,9 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
>
<context:property-placeholder location="classpath:springScheduled.properties"/>

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package org.baeldung.properties.core;
package org.baeldung.properties.external;
import org.baeldung.properties.spring.PropertiesWithXmlConfig;
import org.junit.Ignore;

View File

@ -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;