removed all PropertyPlaceholderConfigure references
This commit is contained in:
-21
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
-23
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user