在学习使用 mybatis-plus 时,遇到一个奇怪的异常 如 代码一:

代码一:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-07-17 09:16:28.739 ERROR 9800 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
APPLICATION FAILED TO START
*************************** Description: Field baseMapper in com.baomidou.mybatisplus.extension.service.impl.ServiceImpl required a single bean, but 3 were found:
- miguBusiHisMapper: defined in file [D:\workspaceIdea\ywjc-refactor\target\classes\com\guoll\modules\miguProject\mapper\MiguBusiHisMapper.class]
- miguBusiInfoMapper: defined in file [D:\workspaceIdea\ywjc-refactor\target\classes\com\guoll\modules\miguProject\mapper\MiguBusiInfoMapper.class]
- sysUserMapper: defined in file [D:\workspaceIdea\ywjc-refactor\target\classes\com\guoll\modules\sysmanage\mapper\SysUserMapper.class] 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 Process finished with exit code 1

该错误怎么解决,求大佬指点

 

Field baseMapper in com.baomidou.mybatisplus.extension.service.impl.ServiceImpl required a single bean, but xx were found:的更多相关文章

  1. 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'

    1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...

  2. Field in required a single bean, but 2 were found:

    我在其他类注入的时候出现以下错误 @Autowired NodeAgentService nodeAgentService; 异常 Description: Field mibService in c ...

  3. Field amqpTemplate in * required a single bean, but 3 were found:

    Field amqpTemplate in * required a single bean, but 3 were found: Spring Boot 启动的时候报的错 使用Spring Boot ...

  4. 【记录】Field required a single bean, but 2 were found:

    重构遇到个小问题,记录下: 错误信息: *************************** APPLICATION FAILED TO START ************************ ...

  5. mybatis-plus热部署mapper.xml插件JRebel MybatisPlus extension,报错:java.lang.NullPointerException

    事件 mybatis转mybatis-plus,结果原来的Jrebel for intrllij 不能热部署mapper.xml文件,百度得知得添加新的插件 JRebel MybatisPlus ex ...

  6. 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< ...

  7. Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService

    2019-03-19 16:22:14,945 WARN [main] (org.springframework.context.support.AbstractApplicationContext. ...

  8. 【Java 新建项目】使用程序对新项目的各个实体 创建Dao、DaoImpl、Service、ServiceImpl层的文件

    首先给出基本Dao层代码: GenericDao.java package com.agen.dao; import java.io.Serializable; import java.util.Co ...

  9. service和serviceImpl的选择

    同行中,有些同行公司的代码风格是service层=service接口+serviceImpl实现类: 而有的同行公司的代码风格是service层=service类: 为什么不一样呢? 以前没想过这个问 ...

随机推荐

  1. electron启动出现短暂的白屏

    mainWindow = new BrowserWindow({ height: 600, width: 960, frame: false, minWidth: 710, minHeight: 50 ...

  2. anaconda 安装caffe,cntk,theano-未整理

    一,anancona 安装 https://repo.anaconda.com/archive/ conda create -n caffe_gpu -c defaults python=3.6 ca ...

  3. 【Leetcode】二进制求和

    解题思路: 1. 首先在两个字符串前面补‘0’,使它们等长.否则要一直监督操作是否超出两个字符串的索引. 2. 从后向前遍历所有位数,同位相加.字符相加,利用ASCII码,字符在内部都用数字表示,我们 ...

  4. macOS 更新 git 命令提示 xcrun,.gitignore 配置不生效问题。

    macOS 更新 运行git提示xcrun: error: invalid active developer path 在终端输入 xcode-select --install 即可以解决该问题 .g ...

  5. xwiki安装部署

    环境介绍 http://aiushtha-mybook.stor.sinaapp.com/xwiki/xwiki%E4%BB%8E%E5%85%A5%E9%97%A8%E5%88%B0%E8%BF%9 ...

  6. substring()方法是如何工作

    1.substring()方法做了什么? substring(beginIndex,endIndex)方法返回一个从beginIndex到endIndex-1的字符串 String x = " ...

  7. 关于Tomcat重启和关闭后重启session变化

    ,当页面第一次访问,session的attribute还未赋值,为null 当页面第二次访问时,这时当前的session的attribute有值了! 到了本文章的点题时刻!! 如果我是直接点击serv ...

  8. Mysql锁表问题解决过程

    开发中难免会遇到数据库操作锁表问题,这里说下解决过程,算是记录了. show OPEN TABLES where In_use > 0; 查看哪些表被锁了 show processlist 查看 ...

  9. ffmpeg保持原视频画面比例 自动添加黑边

    ffmpeg保持原视频画面比例 自动添加黑边 例如源是1280*528要转成640*480要保持画面比例实际上应该640*264 所以需要在上下都加黑边 ffmpeg -i d:/Media/e.f4 ...

  10. python2与3自由切换

    Ubuntu-.04Python2与Python3自由切换 阅读目录(Content) 一.配置ssh链接 二.安装Python3及pip3 三.将Python3设置为默认 python2切换pyth ...