Browse Source

Configuration class processing uses MetadataReaderFactory for current ResourceLoader

Issue: SPR-14684
pull/1172/head
Juergen Hoeller 8 years ago
parent
commit
5405c07d26
  1. 3
      spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java

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

@ -205,6 +205,9 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo @@ -205,6 +205,9 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
public void setResourceLoader(ResourceLoader resourceLoader) {
Assert.notNull(resourceLoader, "ResourceLoader must not be null");
this.resourceLoader = resourceLoader;
if (!this.setMetadataReaderFactoryCalled) {
this.metadataReaderFactory = new CachingMetadataReaderFactory(resourceLoader);
}
}
@Override

Loading…
Cancel
Save