Field baseMapper in com.baomidou.mybatisplus.extension.service.impl.ServiceImpl required a single bean, but xx were found:
在学习使用 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:的更多相关文章
- 解决:Field xxMapper in xx.service.impl.xxServiceImpl required a bean of type 'xx.mapper.xxMapper'
1.启动 SpringBoot项目报错,使用的是Springboot.Spring.Mybatis连接Mysql数据库,启动SpringBoot项目报错,错误如下所示: _____ .__/\ .__ ...
- Field in required a single bean, but 2 were found:
我在其他类注入的时候出现以下错误 @Autowired NodeAgentService nodeAgentService; 异常 Description: Field mibService in c ...
- 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 ...
- 【记录】Field required a single bean, but 2 were found:
重构遇到个小问题,记录下: 错误信息: *************************** APPLICATION FAILED TO START ************************ ...
- mybatis-plus热部署mapper.xml插件JRebel MybatisPlus extension,报错:java.lang.NullPointerException
事件 mybatis转mybatis-plus,结果原来的Jrebel for intrllij 不能热部署mapper.xml文件,百度得知得添加新的插件 JRebel MybatisPlus ex ...
- 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< ...
- 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. ...
- 【Java 新建项目】使用程序对新项目的各个实体 创建Dao、DaoImpl、Service、ServiceImpl层的文件
首先给出基本Dao层代码: GenericDao.java package com.agen.dao; import java.io.Serializable; import java.util.Co ...
- service和serviceImpl的选择
同行中,有些同行公司的代码风格是service层=service接口+serviceImpl实现类: 而有的同行公司的代码风格是service层=service类: 为什么不一样呢? 以前没想过这个问 ...
随机推荐
- vue3作业
""" 1.按照上方 知识点总结 模块,总结今天所学知识点: 2.有以下广告数据(实际数据命名可以略做调整) ad_data = { tv: [ {img: 'img/t ...
- Nginx静态文件服务器配置方法
在Java开发以及生产环境中,最常用的web应用服务器当属Tomcat,尽管这只猫也能够处理一些静态请求,例如图片.html.样式文件等,但是效率并不是那么尽人意.在生产环境中,我们一般使用Nginx ...
- SpringBoot+Rocketmq
@PostConstruct:用于在依赖关系注入完成之后需要执行的方法上,以执行任何初始化.此方法必须在将类放入服务之前调用. @PreDestroy:在开发中我们如果要在关闭spring容器后释放一 ...
- 2019JAVA最新课程-React从入门到实战(新)
1.准备工作 可以在yunp.top网站看webpack,node/npm,cnpm的相关使用视频教程 react有两种使用方式,一是在现有网站中添加:二是创建一个全新的 官网创建全新一个react ...
- css-select的三角在不同浏览器的样式是不一样的,所以我们这样解决???
select{ width:57px; height:23px; border:1px solid #e9e9e9; outline: none; appearance: none; -moz-app ...
- Memcached在Asp.net下的应用
Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度.Memcached ...
- 虚拟机使用桥接模式连接网络并且设置静态ip
1.桥接模式连接网络 虚拟机连接网络一共有四种模式,我这里只介绍桥接模式,毕竟坑了我几个小时 设置有线连接,我本来用的无线连接完成微信点餐系统,后来换了有线因为有线连接不会分配ip,和本地电脑使用同一 ...
- SQL create file遇到操作系统错误5拒绝访问
当在sql server 2014创建一个数据库时出现错误:尝试打开或创建物理文件 'G:\Test.mdf' 时,CREATE FILE 遇到操作系统错误 5(拒绝访问). 原因及解决方法如下: 这 ...
- 一个优雅的图片裁剪插件vue-cropper
github: https://github.com/xyxiao001/vue-cropper
- swiper实现滑动到某页锁住不让滑动
var swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', onTouchStart: funct ...