Browse Source

Merge branch '2.1.x'

pull/662/head
Spencer Gibb 5 years ago
parent
commit
5f3981bbfc
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 7
      spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java

7
spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/PropertySourceLocator.java

@ -44,7 +44,12 @@ public interface PropertySourceLocator { @@ -44,7 +44,12 @@ public interface PropertySourceLocator {
PropertySource<?> locate(Environment environment);
default Collection<PropertySource<?>> locateCollection(Environment environment) {
PropertySource<?> propertySource = locate(environment);
return locateCollection(this, environment);
}
static Collection<PropertySource<?>> locateCollection(PropertySourceLocator locator,
Environment environment) {
PropertySource<?> propertySource = locator.locate(environment);
if (propertySource == null) {
return Collections.emptyList();
}

Loading…
Cancel
Save