|
21 | 21 | import org.springframework.aot.AotDetector; |
22 | 22 | import org.springframework.beans.BeansException; |
23 | 23 | import org.springframework.beans.MutablePropertyValues; |
24 | | -import org.springframework.beans.factory.BeanClassLoaderAware; |
25 | 24 | import org.springframework.beans.factory.FactoryBean; |
26 | 25 | import org.springframework.beans.factory.NoSuchBeanDefinitionException; |
27 | 26 | import org.springframework.beans.factory.aot.BeanRegistrationExcludeFilter; |
|
38 | 37 | import org.springframework.context.ApplicationContextInitializer; |
39 | 38 | import org.springframework.context.ApplicationListener; |
40 | 39 | import org.springframework.context.ConfigurableApplicationContext; |
| 40 | +import org.springframework.context.ResourceLoaderAware; |
41 | 41 | import org.springframework.context.annotation.AnnotationConfigUtils; |
42 | 42 | import org.springframework.context.annotation.ConfigurationClassPostProcessor; |
43 | 43 | import org.springframework.context.event.ContextRefreshedEvent; |
44 | 44 | import org.springframework.core.Ordered; |
45 | 45 | import org.springframework.core.PriorityOrdered; |
| 46 | +import org.springframework.core.io.ResourceLoader; |
46 | 47 | import org.springframework.core.type.classreading.CachingMetadataReaderFactory; |
47 | 48 | import org.springframework.core.type.classreading.MetadataReaderFactory; |
48 | 49 |
|
@@ -187,14 +188,14 @@ private void configureConfigurationClassPostProcessor(ConfigurationClassPostProc |
187 | 188 | * {@link FactoryBean} to create the shared {@link MetadataReaderFactory}. |
188 | 189 | */ |
189 | 190 | static class SharedMetadataReaderFactoryBean |
190 | | - implements FactoryBean<ConcurrentReferenceCachingMetadataReaderFactory>, BeanClassLoaderAware, |
| 191 | + implements FactoryBean<ConcurrentReferenceCachingMetadataReaderFactory>, ResourceLoaderAware, |
191 | 192 | ApplicationListener<ContextRefreshedEvent> { |
192 | 193 |
|
193 | 194 | private ConcurrentReferenceCachingMetadataReaderFactory metadataReaderFactory; |
194 | 195 |
|
195 | 196 | @Override |
196 | | - public void setBeanClassLoader(ClassLoader classLoader) { |
197 | | - this.metadataReaderFactory = new ConcurrentReferenceCachingMetadataReaderFactory(classLoader); |
| 197 | + public void setResourceLoader(ResourceLoader resourceLoader) { |
| 198 | + this.metadataReaderFactory = new ConcurrentReferenceCachingMetadataReaderFactory(resourceLoader); |
198 | 199 | } |
199 | 200 |
|
200 | 201 | @Override |
|
0 commit comments