在学习使用 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. Hive 窗口函数LEAD LAG FIRST_VALUE LAST_VALUE

    窗口函数(window functions)对多行进行操作,并为查询中的每一行返回一个值. OVER()子句能将窗口函数与其他分析函数(analytical functions)和报告函数(repor ...

  2. 集合综合练习<二>

    package com.JiHeTotal; import java.util.Map; public class Student { int id; String name; Map<Stri ...

  3. excel中汉字转拼音

    Excel中文转拼音(完整版)打开Excel->工具->宏->Viaual Basic编辑器在弹出来的窗口中对着VBAproject点右键->插入->模块下面会出现一个名 ...

  4. shell练习--PAT题目1007:关于素数对(失败案例)

    让我们定义d​n​​为:d​n​​=p​n+1​​−p​n​​,其中p​i​​是第i个素数.显然有d​1​​=1,且对于n>1有d​n​​是偶数.“素数对猜想”认为“存在无穷多对相邻且差为2的素 ...

  5. 基于STM32的CRC校验说明

    ///***************************************************************************** //下面是test.c里面的函数 // ...

  6. 【canvas学习笔记六】状态保存和变换

    save()和restore() save() 保存当前状态,将当前canvas的状态存入栈中. restore() 恢复之前save的一个状态,将之前的状态从栈中弹出. 保存的当前状态包含以下信息: ...

  7. 组件内导航之beforeRouteUpdate的使用

    使用场景: 组件复用:路由跳转: beforeRouteUpdate (to, from, next) { // 在当前路由改变,但是该组件被复用时调用 // 举例来说,对于一个带有动态参数的路径 / ...

  8. 安装浏览器的vue插件

    安装浏览器的vue插件步骤: 1.在浏览器中打开 https://github.com/vuejs/vue-devtools Clone or download  vue-devtools. 2.解压 ...

  9. 前端iPhone X适配总结

    屏幕尺寸 垂直方向上,iPhone X的显示宽度与iPhone 6,iPhone 7 和 iPhone 8 的 4.7 英寸一样,但是比4.7英寸的显示屏高145pt. 安全区域 安全区域指的是一个可 ...

  10. Yii2.0简单隐藏index.php文件和模块配置和layout布局配置禁用和日志写入配置

    隐藏index.php文件 目的:想去掉浏览器地址栏中的 index.php?r= 这一块. 在/config/web.php中   ’components'=>[]   中添加如下代码: 'u ...