Skip to content

Commit 5405c07

Browse files
committed
Configuration class processing uses MetadataReaderFactory for current ResourceLoader
Issue: SPR-14684
1 parent 34ab818 commit 5405c07

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ public void setEnvironment(Environment environment) {
205205
public void setResourceLoader(ResourceLoader resourceLoader) {
206206
Assert.notNull(resourceLoader, "ResourceLoader must not be null");
207207
this.resourceLoader = resourceLoader;
208+
if (!this.setMetadataReaderFactoryCalled) {
209+
this.metadataReaderFactory = new CachingMetadataReaderFactory(resourceLoader);
210+
}
208211
}
209212

210213
@Override

0 commit comments

Comments
 (0)