admin管理员组文章数量:1794759
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or us
项目原来一直好好地,原来不怎么启动的模块,来了新任务,去启动了一下,发现报错 Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
根据报错信可以得知,是由于多个bean在自动装配时冲突了,需把其中一个bean加上@Primary注解,或者每一个bean在注入时使用@Qualifier注解标识注入bean的名称。 再仔细翻一翻报错日志,找一找是哪些bean起了冲突 把日志中的bean,选一个加上@Primary注解,问题轻松解决。
本文标签: PRIMARYbeansmarkingupdatingmultiple
版权声明:本文标题:Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or us 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686557029a81579.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论