Reintroduce factory method name in exception thrown from SimpleInstantiationStrategy
This commit is contained in:
@@ -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