Apply "instanceof pattern matching" in PropertySourcesPlaceholderConfigurer
See gh-27947
This commit is contained in:
parent
d72cf89ebf
commit
e565d2cabb
|
@ -137,8 +137,8 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
|
|||
// local PropertyResolver to enforce that setting, since the Environment is most
|
||||
// likely not configured with ignoreUnresolvablePlaceholders set to true.
|
||||
// See https://github.com/spring-projects/spring-framework/issues/27947
|
||||
if (this.ignoreUnresolvablePlaceholders && (this.environment instanceof ConfigurableEnvironment)) {
|
||||
ConfigurableEnvironment configurableEnvironment = (ConfigurableEnvironment) this.environment;
|
||||
if (this.ignoreUnresolvablePlaceholders &&
|
||||
(this.environment instanceof ConfigurableEnvironment configurableEnvironment)) {
|
||||
PropertySourcesPropertyResolver resolver =
|
||||
new PropertySourcesPropertyResolver(configurableEnvironment.getPropertySources());
|
||||
resolver.setIgnoreUnresolvableNestedPlaceholders(true);
|
||||
|
|
Loading…
Reference in New Issue