|
|
|
@ -18,6 +18,8 @@ package org.springframework.boot.context.properties.source; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* An iterable {@link PrefixedConfigurationPropertySource}. |
|
|
|
* An iterable {@link PrefixedConfigurationPropertySource}. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -32,6 +34,9 @@ class PrefixedIterableConfigurationPropertySource extends PrefixedConfigurationP |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Stream<ConfigurationPropertyName> stream() { |
|
|
|
public Stream<ConfigurationPropertyName> stream() { |
|
|
|
|
|
|
|
if (!StringUtils.hasText(getPrefix())) { |
|
|
|
|
|
|
|
return getSource().stream(); |
|
|
|
|
|
|
|
} |
|
|
|
ConfigurationPropertyName prefix = ConfigurationPropertyName.of(getPrefix()); |
|
|
|
ConfigurationPropertyName prefix = ConfigurationPropertyName.of(getPrefix()); |
|
|
|
return getSource().stream().map((propertyName) -> { |
|
|
|
return getSource().stream().map((propertyName) -> { |
|
|
|
if (prefix.isAncestorOf(propertyName)) { |
|
|
|
if (prefix.isAncestorOf(propertyName)) { |
|
|
|
|