Browse Source

Restore customization of PropertyResolver

This commit reintroduces the ability to customize the PropertyResolver
to use in PropertySourcesPropertyResolver

See gh-26761
pull/31496/head
lwpro2 4 years ago committed by Stephane Nicoll
parent
commit
00fffb7ab0
  1. 9
      spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java

9
spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java

@ -170,10 +170,17 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS @@ -170,10 +170,17 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
}
}
processProperties(beanFactory, new PropertySourcesPropertyResolver(this.propertySources));
processProperties(beanFactory, getPropertyResolver(this.propertySources));
this.appliedPropertySources = this.propertySources;
}
/**
* Construct and provide a PropertyResolver from the given properties.
*/
public ConfigurablePropertyResolver getPropertyResolver(MutablePropertySources propertySources){
return new PropertySourcesPropertyResolver(propertySources);
}
/**
* Visit each bean definition in the given bean factory and attempt to replace ${...} property
* placeholders with values from the given properties.

Loading…
Cancel
Save