多数据源报错 expected single matching bean but found 2: xxx,xxx

问题: expected single matching bean but found 2: xxx,xxx 原因:在 Spring 容器中配置了两个类型Bean,Spring 容器将无法确定到底要用哪一个 Bean,因此异常发生了。 解决方法: 使用 @Qualifier 注释指定注入 Bean 的名称  
本站公众号
   欢迎关注本站公众号,获取更多信息