问题如下:

接口也作为匹配的bean?

有点迷惑了。。。。。。。

经过在网上找资料,发现和@MapperScan这个注解有关系,具体源码不止。但是这个注解会扫描路径下的所有类。

去掉这个注解就可以正常使用了;至于具体原因。未知待查。

expected single matching bean but found 2: menusServiceImpl,IMenusService的更多相关文章

  1. spring " expected single matching bean but found 2" 问题一例。

    初入java,使用spring时遇到一个问题,左边是一个接口和实现.右边是service和实现. @Service@Transactional(rollbackFor = Exception.clas ...

  2. spring依赖注入单元测试:expected single matching bean but found 2

    异常信息:org.springframework.beans.factory.UnsatisfiedDependencyException: Caused by: org.springframewor ...

  3. expected single matching bean but found 2

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'acc ...

  4. MyBatis Plus:No qualifying bean of type 'com.baomidou.mybatisplus.mapper.BaseMapper<?>' available: expected single matching bean but found 4

    场景: 应用MyBatis Plus 和通用Mapper 继承自ServiceImpl实现对Service里的方法进行包装再处理. public interface IServiceBase2< ...

  5. 深入Spring Boot:怎样排查expected single matching bean but found 2的异常

    写在前面 这个demo来说明怎么排查一个常见的spring expected single matching bean but found 2的异常. https://github.com/hengy ...

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

    问题: expected single matching bean but found 2: xxx,xxx 原因:在 Spring 容器中配置了两个类型Bean,Spring 容器将无法确定到底要用 ...

  7. Spring 3.2 @Autowired异常:expected single matching bean but found 2

    在使用Sping做单元测试时候,对RequestMappingHandlerAdapter(从处理器包装过来的适配器)进行自动装配, 发现报:expected single matching bean ...

  8. 多个@bean无法通过@resource注入对应的bean(org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected single matching bean but found )

    一.异常 org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type ' ...

  9. Spring Boot 自定义配置文件异常"expected single matching bean but found 2"

    运行环境:Spring Boot 2.5.0, IDEA 2020.3.2 异常详细信息: Injection of resource dependencies failed; nested exce ...

随机推荐

  1. Java实现第九届蓝桥杯三体攻击

    三体攻击 [题目描述] 三体人将对地球发起攻击.为了抵御攻击,地球人派出了 A × B × C 艘战舰,在太空中排成一个 A 层 B 行 C 列的立方体.其中,第 i 层第 j 行第 k 列的战舰(记 ...

  2. java实现第六届蓝桥杯立方尾不变

    立方尾不变 立方尾不变 有些数字的立方的末尾正好是该数字本身. 比如:1,4,5,6,9,24,25,- 请你计算一下,在10000以内的数字中(指该数字,并非它立方后的数值),符合这个特征的正整数一 ...

  3. Linux 用户组管理命令

    groupadd 组名,可以添加用户组 groupmod -n 新组名 老组名,可以修改组名 groupdel 组名,可以删除组(组中不能有初始用户存在,附加用户无所谓) gpasswd -a 用户名 ...

  4. 宝塔面板如何有效的清除SSL证书以及缓存

    一:关闭SSL 我们先关闭SSL证书,这个大家都会的吧.如图: 二:证书夹 网站配置的证书夹,我们删除掉,如图: 三:寻找SSL证书路径 网站配置里有一路径我们看下:如下 ssl_certificat ...

  5. Linux系统管理——初学者建议

    学习Linux的注意事项(一) Linux严格区分大小写 Linux是严格区分大小写的,这一点和Windows不一样,所以操作时要注意区分大小写的不同,包括文件名和目录名.命令.命令选项.配置文件配置 ...

  6. mysql小数类型

    原文链接:https://blog.csdn.net/weixin_42047611/article/details/81449663 MySQL 中使用浮点数和定点数来表示小数. 浮点类型有两种,分 ...

  7. TestLoader源码解析

    def loadTestsFromTestCase(self, testCaseClass) #看名称分析:从TestCase找测试集--那么就是把我们的def用例加载到testSuit里面 def ...

  8. Linux 开放指定端口号

    1.开启防火墙 [root@localhost opt]# systemctl start firewalld 2.查看当前防火墙状态 [root@localhost opt]# systemctl ...

  9. Linux下重新设置 MySQL 的密码

    1.重置密码的第一步就是跳过MySQL的密码认证过程,方法如下: #vim /etc/my.cnf(注:windows下修改的是my.ini) 很多老铁,在开始时设置了 MySQL 的密码,后来一段时 ...

  10. 在PHPstorm中使用数组短语法[],出现红色波浪

    在PHPstorm中使用数组短语法[],出现红色波浪 1. 在tp3.2.3项目中使用数组短语法[],报错如下错误: Short array syntax is allowed in PHP 5.4 ...