Closed as not planned
Closed as not planned
Description
Adrian J George III opened SPR-15245 and commented
When using a ClassPathBeanDefinitionScanner with a different class loader than the attached context, ConfigurationClassParser.asSourcreClass abandons the provided classloader and uses the context's loader instead. This leads to the class not being found and a failure of the context to initialize.
This line
calls through to
which uses the local class loader.
The problem can be reproduced here
https://github.com/adrianjgeorge/classloading-poc
Affects: 4.3.6
Issue Links:
- ConfigurationClassParser needs to load annotations through source class loader [SPR-10343] #14977 ConfigurationClassParser needs to load annotations through source class loader