Fix regression in @PropertySource placeholder resolution
Changes in commit41ade68b50introduced 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 Backport-Issue: SPR-9127 Backport-Commit:4df2a14b13
This commit is contained in:
@@ -185,7 +185,7 @@ class ConfigurationClassParser {
|
|||||||
throw new IllegalArgumentException("At least one @PropertySource(value) location is required");
|
throw new IllegalArgumentException("At least one @PropertySource(value) location is required");
|
||||||
}
|
}
|
||||||
for (int i = 0; i < nLocations; i++) {
|
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();
|
ClassLoader classLoader = this.resourceLoader.getClassLoader();
|
||||||
if (!StringUtils.hasText(name)) {
|
if (!StringUtils.hasText(name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user