ConfigurationClassParser load annotations through source class loader

Issue: SPR-10343
This commit is contained in:
Juergen Hoeller 2016-07-15 16:02:06 +02:00
parent 12bff6b3a0
commit 9e93403857
1 changed files with 1 additions and 1 deletions

View File

@ -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) {