Skip to content

Commit

Permalink
CompositePropertySource allows for access to its nested property sources
Browse files Browse the repository at this point in the history
Issue: SPR-12182
  • Loading branch information
jhoeller committed Sep 12, 2014
1 parent 70412a9 commit 553930a
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -75,6 +76,14 @@ public void addFirstPropertySource(PropertySource<?> propertySource) {
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]",
Expand Down

0 comments on commit 553930a

Please sign in to comment.