@ -32,7 +36,7 @@ public class BeanNotOfRequiredTypeException extends BeansException {
@@ -32,7 +36,7 @@ public class BeanNotOfRequiredTypeException extends BeansException {
privatefinalStringbeanName;
/** The required type. */
privatefinalClass<?>requiredType;
privatefinalTypegenericRequiredType;
/** The offending type. */
privatefinalClass<?>actualType;
@ -46,10 +50,22 @@ public class BeanNotOfRequiredTypeException extends BeansException {
@@ -46,10 +50,22 @@ public class BeanNotOfRequiredTypeException extends BeansException {
super("Bean named '"+beanName+"' is expected to be of type '"+requiredType.getTypeName()+
"' but was actually of type '"+ClassUtils.getQualifiedName(actualType)+"'");
this.beanName=beanName;
this.requiredType=requiredType;
this.genericRequiredType=requiredType;
this.actualType=actualType;
}
@ -65,7 +81,15 @@ public class BeanNotOfRequiredTypeException extends BeansException {
@@ -65,7 +81,15 @@ public class BeanNotOfRequiredTypeException extends BeansException {
@ -149,6 +151,17 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
@@ -149,6 +151,17 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
@ -1305,6 +1306,12 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
@@ -1305,6 +1306,12 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader