Enforce early initialization of CGLIB method proxies (for AOT processing)

For non-required method proxies, prefer regular reflective invocation instead.

See gh-29107
This commit is contained in:
Juergen Hoeller
2022-10-03 13:22:49 +02:00
parent 332961f833
commit d873f60fef
2 changed files with 8 additions and 1 deletions

View File

@@ -541,7 +541,7 @@ class ConfigurationClassEnhancer {
if (method.getName().equals("getObject") && args.length == 0) {
return beanFactory.getBean(beanName);
}
return proxy.invoke(factoryBean, args);
return method.invoke(factoryBean, args);
});
return fbProxy;