提交 553930a9 编写于 作者: J Juergen Hoeller

CompositePropertySource allows for access to its nested property sources

Issue: SPR-12182
上级 70412a9d
......@@ -17,6 +17,7 @@
package org.springframework.core.env;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
......@@ -75,6 +76,14 @@ public class CompositePropertySource extends PropertySource<Object> {
this.propertySources.addAll(existing);
}
/**
* Return all property sources that this composite source holds.
* @since 4.1.1
*/
public Collection<PropertySource<?>> getPropertySources() {
return this.propertySources;
}
@Override
public String toString() {
return String.format("%s [name='%s', propertySources=%s]",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册