Java添加构造方法异常——Could not autowire. there is more than one bean of '' type
在写一个Test类的时候,为这个Test添加一个带参构造方法,但是对构造方法的入参提示:
Could not autowire. there is more than one bean of ‘’ type
开始有点摸不着头脑,后面仔细一想, 难道是影响这个类在其他地方注入了? 注入默认都是用的无参构造方法。 于是自己在加了一个无参构造方法,问题解决!
本文原文地址:https://blog.csdn.net/moneyshi/article/details/84034696
还没有评论,来说两句吧...