Browse Source

Fix regression in @PropertySource placeholder resolution

Changes in commit 41ade68b50 introduced
a regression causing all but the first location in the
@PropertySource#value array to be ignored during ${...} placeholder
resolution. This change ensures that all locations are processed and
replaced as expected.

Issue: SPR-9133, SPR-9127
pull/41/merge
Chris Beams 13 years ago
parent
commit
4df2a14b13
  1. 2
      spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

2
spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

@ -185,7 +185,7 @@ class ConfigurationClassParser { @@ -185,7 +185,7 @@ class ConfigurationClassParser {
throw new IllegalArgumentException("At least one @PropertySource(value) location is required");
}
for (int i = 0; i < nLocations; i++) {
locations[0] = this.environment.resolveRequiredPlaceholders(locations[0]);
locations[i] = this.environment.resolveRequiredPlaceholders(locations[i]);
}
ClassLoader classLoader = this.resourceLoader.getClassLoader();
if (!StringUtils.hasText(name)) {

Loading…
Cancel
Save