perperties work
This commit is contained in:
parent
556b7ca886
commit
75b533efe9
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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"/>
|
||||
|
@ -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
|
@ -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
|
@ -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;
|
@ -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;
|
@ -1,4 +1,4 @@
|
||||
package org.baeldung.properties.core;
|
||||
package org.baeldung.properties.external;
|
||||
|
||||
import org.baeldung.properties.spring.PropertiesWithXmlConfig;
|
||||
import org.junit.Ignore;
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user