|
|
|
@ -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(); |
|
|
|
|
} |
|
|
|
|