perperties work

This commit is contained in:
eugenp 2015-08-15 18:08:54 +03:00
parent 75b533efe9
commit 3bc0b756ad
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package org.baeldung.properties.spring;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@Configuration
@ImportResource("classpath:basicConfigForPropertiesTwo.xml")
public class PropertiesWithXmlConfigTwo {
public PropertiesWithXmlConfigTwo() {
super();
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"
>
<context:property-placeholder location="classpath:foo.properties"/>
</beans>