Skip to content

Commit 00fffb7

Browse files
1zg12snicoll
authored andcommitted
Restore customization of PropertyResolver
This commit reintroduces the ability to customize the PropertyResolver to use in PropertySourcesPropertyResolver See gh-26761
1 parent 89b7a6b commit 00fffb7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,17 @@ public String getProperty(String key) {
170170
}
171171
}
172172

173-
processProperties(beanFactory, new PropertySourcesPropertyResolver(this.propertySources));
173+
processProperties(beanFactory, getPropertyResolver(this.propertySources));
174174
this.appliedPropertySources = this.propertySources;
175175
}
176176

177+
/**
178+
* Construct and provide a PropertyResolver from the given properties.
179+
*/
180+
public ConfigurablePropertyResolver getPropertyResolver(MutablePropertySources propertySources){
181+
return new PropertySourcesPropertyResolver(propertySources);
182+
}
183+
177184
/**
178185
* Visit each bean definition in the given bean factory and attempt to replace ${...} property
179186
* placeholders with values from the given properties.

0 commit comments

Comments
 (0)