问题如下:

接口也作为匹配的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. MySQL数据库基本使用(DDL)

    MySQL是一种开源的关系型数据库管理系统,并且因为其性能.可靠性和适应性而备受关注.下面是最近一个月MySQL.Oracle.SQL Server的百度指数搜索指数对比: 可以看到,在最近一个月,M ...

  2. Centos宝塔安装NextCloud

    官方版本列表链接:https://download.nextcloud.com/server/releases/ 我下载的是 16.0.6版本,下载链接:https://download.nextcl ...

  3. (十一)DVWA全等级SQL Injection(Blind)盲注--手工测试过程解析

    一.DVWA-SQL Injection(Blind)测试分析 SQL盲注 VS 普通SQL注入: 普通SQL注入 SQL盲注 1.执行SQL注入攻击时,服务器会响应来自数据库服务器的错误信息,信息提 ...

  4. Python—变量,条件语句,while循环,运算符,字符串等

     Python初识以及变量: 变量名:——字母 ——数字 ——下划线[见名识意] (PS:数字不能开头:不能是关键字:最好不能和python内置的东西重复) ##################### ...

  5. 并发系列(一)——线程池源码(ThreadPoolExecutor类)简析

    前言 本文主要是结合源码去线程池执行任务的过程,基于JDK 11,整个过程基本与JDK 8相同. 个人水平有限,文中若有表达有误的,欢迎大伙留言指出,谢谢了! 一.线程池简介 1.1 使用线程池的优点 ...

  6. if test表达式逻辑判断不能用&&

    用&&会报错 用and 例如: <if test="age!=null and name!=null">

  7. matlab实现梯度下降法(Gradient Descent)的一个例子

    在此记录使用matlab作梯度下降法(GD)求函数极值的一个例子: 问题设定: 1. 我们有一个$n$个数据点,每个数据点是一个$d$维的向量,向量组成一个data矩阵$\mathbf{X}\in \ ...

  8. RocketMQ系列(七)事务消息(数据库|最终一致性)

    终于到了今天了,终于要讲RocketMQ最牛X的功能了,那就是事务消息.为什么事务消息被吹的比较热呢?近几年微服务大行其道,整个系统被切成了多个服务,每个服务掌管着一个数据库.那么多个数据库之间的数据 ...

  9. 全网最全fiddler使用教程和fiddler如何抓包(fiddler手机抓包)-笔者亲测

    一.前言 抓包工具有很多,比如常用的抓包工具Httpwatch,通用的强大的抓包工具Wireshark.为什么使用fiddler?原因如下:1.Wireshark是通用的抓包工具,但是比较庞大,对于只 ...

  10. xenomai内核解析之双核系统调用(一)

    版权声明:本文为本文为博主原创文章,转载请注明出处.如有错误,欢迎指正.博客地址:https://www.cnblogs.com/wsg1100/ 目录 xenomai 内核系统调用 一.32位Lin ...