mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 07:39:09 +00:00
Define compiled classes when @CompileWithTargetClassAccess is used
Update `DynamicClassLoader` to load classes eagerly if they are being defined in the parent classloader. See gh-28580
This commit is contained in:
+3
@@ -57,6 +57,9 @@ public class DynamicClassLoader extends ClassLoader {
|
||||
this.resourceFiles = resourceFiles;
|
||||
this.classFiles = classFiles;
|
||||
this.defineClassMethod = findDefineClassMethod(parent);
|
||||
if (this.defineClassMethod != null) {
|
||||
classFiles.forEach(this::defineClass);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user