From 79ec294fd94c5e452a50569e7f800b6a5a4d4cef Mon Sep 17 00:00:00 2001 From: DOHA Date: Fri, 8 Jul 2016 18:49:39 +0200 Subject: [PATCH] add systemPropertiesModeName example --- .../PropertiesWithPlaceHolderConfigurer.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java diff --git a/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java b/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java new file mode 100644 index 0000000000..f96184a8a3 --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java @@ -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; + } + +} \ No newline at end of file