mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-02 20:49:02 +00:00
Reintroduce factory method name in exception thrown from SimpleInstantiationStrategy
This commit is contained in:
+2
-1
@@ -160,7 +160,8 @@ public class SimpleInstantiationStrategy implements InstantiationStrategy {
|
||||
"Cannot access factory method '" + factoryMethod.getName() + "'; is it public?", ex);
|
||||
}
|
||||
catch (InvocationTargetException ex) {
|
||||
String msg = ex.getTargetException().getMessage();
|
||||
String msg = "Factory method '" + factoryMethod.getName() + "' threw exception with message: " +
|
||||
ex.getTargetException().getMessage();
|
||||
if (bd.getFactoryBeanName() != null && owner instanceof ConfigurableBeanFactory &&
|
||||
((ConfigurableBeanFactory) owner).isCurrentlyInCreation(bd.getFactoryBeanName())) {
|
||||
msg = "Circular reference involving containing bean '" + bd.getFactoryBeanName() + "' - consider " +
|
||||
|
||||
Reference in New Issue
Block a user