removed all PropertyPlaceholderConfigure references

This commit is contained in:
Gerardo Roza
2020-11-23 12:30:41 -03:00
parent 29cca467c4
commit 0185b2d0fb
7 changed files with 1 additions and 154 deletions
@@ -1,21 +0,0 @@
package com.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;
}
}
@@ -1,23 +0,0 @@
package com.baeldung.properties.spring;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.*;
@Configuration
public class PropertyPlaceholderConfig {
public PropertyPlaceholderConfig(){
super();
}
@Bean
public static PropertyPlaceholderConfigurer properties() {
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
Resource[] resources = new ClassPathResource[]{ new ClassPathResource("foo.properties") };
ppc.setLocations( resources );
ppc.setIgnoreUnresolvablePlaceholders( true );
return ppc;
}
}