diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index 2a7e348a27..444d42f8bd 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -230,6 +230,16 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS } + @Override + public boolean containsProperty(String name) { + for (PropertySource propertySource : super.source.getPropertySources()) { + if (propertySource.containsProperty(name)) { + return true; + } + } + return false; + } + @Override public @Nullable Object getProperty(String name) { for (PropertySource propertySource : super.source.getPropertySources()) { @@ -241,16 +251,6 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS return null; } - @Override - public boolean containsProperty(String name) { - for (PropertySource propertySource : super.source.getPropertySources()) { - if (propertySource.containsProperty(name)) { - return true; - } - } - return false; - } - @Override public String toString() { return "ConfigurableEnvironmentPropertySource {propertySources=" + super.source.getPropertySources() + "}"; @@ -270,6 +270,11 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS } + @Override + public boolean containsProperty(String name) { + return super.source.containsProperty(name); + } + @Override public @Nullable Object getProperty(String name) { return super.source.getProperty(name);