work on properties

This commit is contained in:
eugenp
2015-08-15 18:14:55 +03:00
parent 3bc0b756ad
commit 7243b16d49
12 changed files with 44 additions and 13 deletions
@@ -1,4 +1,4 @@
package org.baeldung.properties.spring;
package org.baeldung.properties.external;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -1,4 +1,4 @@
package org.baeldung.properties.spring;
package org.baeldung.properties.external;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@@ -1,4 +1,4 @@
package org.baeldung.properties.spring;
package org.baeldung.properties.external;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@@ -1,4 +1,4 @@
package org.baeldung.properties.spring;
package org.baeldung.properties.external;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@@ -0,0 +1,23 @@
package org.baeldung.properties.spring;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
@Configuration
@PropertySource("classpath:foo.properties")
public class BasicPropertiesWithJavaConfig {
public BasicPropertiesWithJavaConfig() {
super();
}
// beans
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
}