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 2686ba5764..11563360da 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 @@ -232,6 +232,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 @Nullable public Object getProperty(String name) { @@ -244,16 +254,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() + "}"; @@ -274,14 +274,14 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS @Override - @Nullable - public Object getProperty(String name) { - return super.source.getProperty(name); + public boolean containsProperty(String name) { + return super.source.containsProperty(name); } @Override - public boolean containsProperty(String name) { - return super.source.containsProperty(name); + @Nullable + public Object getProperty(String name) { + return super.source.getProperty(name); } @Override