diff --git a/.gitignore b/.gitignore index 32c1a89f..14b99f27 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ _site/ /spring-cloud-release-tools*.jar antrun .vscode/ -.flattened-pom.xml \ No newline at end of file +.flattened-pom.xml diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java index 57f6320e..786d53b4 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java @@ -44,7 +44,12 @@ public interface PropertySourceLocator { PropertySource locate(Environment environment); default Collection> locateCollection(Environment environment) { - PropertySource propertySource = locate(environment); + return locateCollection(this, environment); + } + + static Collection> locateCollection(PropertySourceLocator locator, + Environment environment) { + PropertySource propertySource = locator.locate(environment); if (propertySource == null) { return Collections.emptyList(); }