add systemPropertiesModeName example

This commit is contained in:
DOHA 2016-07-08 18:49:39 +02:00
parent ed3e1f4553
commit 79ec294fd9
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package org.baeldung.properties.spring;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class PropertiesWithPlaceHolderConfigurer {
public PropertiesWithPlaceHolderConfigurer() {
super();
}
@Bean
public PropertyPlaceholderConfigurer propertyConfigurer() {
final PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
props.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_FALLBACK);
return props;
}
}