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;
|
||||
}
|
||||
}
|
||||
-9
@@ -3,15 +3,6 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"
|
||||
>
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:foo.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="ignoreUnresolvablePlaceholders" value="true"/>
|
||||
</bean>
|
||||
|
||||
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<list>
|
||||
|
||||
Reference in New Issue
Block a user