没有合适的资源?快使用搜索试试~ 我知道了~
spring boot整合mybatis-plus启动报错问题及解答.pdf
需积分: 32 25 下载量 121 浏览量
2020-08-04
20:19:25
上传
评论
收藏 165KB PDF 举报
温馨提示
试读
2页
解决spring-boot整合mybatis-plus启动报错问题; Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-08-04 20:19:03.246 ERROR 18020 --- [ main] o.s.boot.SpringApplication : Application run failed
资源推荐
资源详情
资源评论
ErrorstartingApplicationContext.Todisplaytheconditionsreportre-runyour
applicationwith'debug'enabled.
2020-08-0419:58:14.209ERROR1432---[main]o.s.boot.SpringApplication
:Applicationrunfailed
org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreating
beanwithname'userController':Unsatisfieddependencyexpressedthroughfield
'userServiceImpl';nestedexceptionis
org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreating
beanwithname'userServiceImpl':Unsatisfieddependencyexpressedthroughfield
'baseMapper';nestedexceptionis
org.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifying
beanoftype'com.jerry.conquer.mapper.UserMapper'available:expectedatleast1
beanwhichqualifiesasautowirecandidate.Dependencyannotations:
出现如上问题大多数人第一可能想到的是依赖冲突,然后
疯狂百度各种问题出来,一顿加依赖和改依赖;其实这是
springboot启动进行包扫描时,不能扫描到Mapper包导
致的启动报错。
解决方案有两种:
第一种:在启动类上加注解
@MapperScan("xx.xx.xx.mapper")
@MapperScans({"xx.xx.xx.mapper","xx.xx.xx.mapper"})
第二种:在每一个Mapper接口上加@Mapper注解
资源评论
Conquer24
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功