ConfigurationClassParser load annotations through source class loader
Issue: SPR-10343
(cherry picked from commit 9e93403)
This commit is contained in:
parent
3d3407c789
commit
a0df71e76a
|
|
@ -857,7 +857,7 @@ class ConfigurationClassParser {
|
||||||
private SourceClass getRelated(String className) throws IOException {
|
private SourceClass getRelated(String className) throws IOException {
|
||||||
if (this.source instanceof Class<?>) {
|
if (this.source instanceof Class<?>) {
|
||||||
try {
|
try {
|
||||||
Class<?> clazz = resourceLoader.getClassLoader().loadClass(className);
|
Class<?> clazz = ((Class<?>) this.source).getClassLoader().loadClass(className);
|
||||||
return asSourceClass(clazz);
|
return asSourceClass(clazz);
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException ex) {
|
catch (ClassNotFoundException ex) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue