constructor注入错误org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean

容器的配置有参构造方法测试
错误日志:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘classb3’ defined in class path resource [springDI.xml]: Unsatisfied dependency expressed through constructor parameter 3: Ambiguous argument values for parameter of type [springIOC_DI.ioc.InterfaceA] - did you specify the correct bean references as arguments?

错误原因:
有参构造里面参数多了一个ia,容器配置index中却没有注入导致的

总结:好记性不如烂笔头,错误特此记录

猜你喜欢

转载自blog.csdn.net/forborn/article/details/89761744