admin管理员组文章数量:1794759
Action: Consider marking one of the beans as @Primary, updating the consumer to accept multiple bean
Action: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
报错可能是因为使用@Autowired注解,但是该接口下有多个实现,导致spring容器不知道将那个子类注入进来
我出现该问题是一个接口继承另一个接口。
解决方案为:接口不要继承,直接全部copy到新接口上,在新的实现类那边用组合的方式即可,如下
可能还会有其他问题导致该报错,比如Mybatis多数据源导致的,不知道去装载那个database,具体可以参照网上大神的帖子
本文标签: beansPRIMARYActionmarkingupdating
版权声明:本文标题:Action: Consider marking one of the beans as @Primary, updating the consumer to accept multiple bean 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686554547a81272.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论