Skip to content

Commit 4df2a14

Browse files
committed
Fix regression in @propertysource placeholder resolution
Changes in commit 41ade68 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
1 parent 37d547c commit 4df2a14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected AnnotationMetadata doProcessConfigurationClass(
185185
throw new IllegalArgumentException("At least one @PropertySource(value) location is required");
186186
}
187187
for (int i = 0; i < nLocations; i++) {
188-
locations[0] = this.environment.resolveRequiredPlaceholders(locations[0]);
188+
locations[i] = this.environment.resolveRequiredPlaceholders(locations[i]);
189189
}
190190
ClassLoader classLoader = this.resourceLoader.getClassLoader();
191191
if (!StringUtils.hasText(name)) {

0 commit comments

Comments
 (0)