Further refine property source ordering
Refine property source ordering so that sources already contained in the environment remain before those added by @PropertySource annotations. Issue: SPR-12198
This commit is contained in:
@@ -128,7 +128,7 @@ class ConfigurationClassParser {
|
||||
|
||||
private final Map<String, ConfigurationClass> knownSuperclasses = new HashMap<String, ConfigurationClass>();
|
||||
|
||||
private final Set<String> propertySourceNames = new LinkedHashSet<String>();
|
||||
private final List<String> propertySourceNames = new ArrayList<String>();
|
||||
|
||||
private final ImportStack importStack = new ImportStack();
|
||||
|
||||
@@ -375,7 +375,8 @@ class ConfigurationClassParser {
|
||||
propertySources.addLast(propertySource);
|
||||
}
|
||||
else {
|
||||
propertySources.addFirst(propertySource);
|
||||
String firstProcessed = this.propertySourceNames.get(this.propertySourceNames.size()-1);
|
||||
propertySources.addBefore(firstProcessed, propertySource);
|
||||
}
|
||||
}
|
||||
this.propertySourceNames.add(name);
|
||||
|
||||
Reference in New Issue
Block a user