Consider defining a bean of type ‘**.Mapper‘ in your configuration
Consider defining a bean of type ‘**.Mapper’ in your configuration
报错
Description:
Field mapper in com.**.service.StudentServiceImpl required a bean of type 'com.**.mapper.StudentxMapper' that could not be found.The injection point has the following annotations:- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:Consider defining a bean of type 'com.**.mapper.StudentxMapper' in your configuration.
错误排查
application.properties
中的内容是:
#整合mybatis
mybatis.type-aliases-package=com.chen.pojo
mybatis.mapper-locations=classpath:mapper/*.xml
但也挡不住爆红,开始以为是spring 的问题
后来发现没有导入 sprin-boot的mybatis的start包。
解决方案
<dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.2.0</version>
</dependency>
运行OK。
整合的时候一定要仔细查看导入的包,不然空费时间。
Consider defining a bean of type ‘**.Mapper‘ in your configuration相关推荐
- Consider defining a bean of type ‘Mapper‘ in your configuration.
错误信息 14:42:02.320 [restartedMain] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisR ...
- springboot 工程启动报错之Consider defining a bean of type ‘XXX’ in your configuration.
一.前言: 使用springboot自动注入的方式搭建好了工程,结果启动的时候报错了!!!,错误如下图: Description:Field userEntityMapper in com.xxx.x ...
- Consider defining a bean of type `xxx` in your configuration问题解决
Consider defining a bean of type `xxx` in your configuration问题解决 参考文章: (1)Consider defining a bean o ...
- springboot启动报错: Consider defining a bean of type ‘XXX‘ in your configuration
Consider defining a bean of type 'XXX' in your configuration 出现这个错误,要看看你是否用到了某些组件,但是启动类上没加相应的注解.比如说我 ...
- 【无法找到FeignClient的bean】 Consider defining a bean of type ‘xxx‘ in your configuration.
Consider defining a bean of type 'xxx' in your configuration. 错误原因:该FeignClient接口在其他jar包中,@EnableFei ...
- SpringBoot 出现 Consider defining a bean of type ‘xxx‘ in your configuration 问题解决方案
大家好,我是trikey. 最近在编写练手项目代码时,出现了Consider defining a bean of type 'xxx' in your configuration 问题,这里简单记录 ...
- 解决启动报错Consider defining a bean of type ‘xxx‘ in your configuration.
解决启动报错Consider defining a bean of type 'xxx' in your configuration. 报错截图 解决方法:查看注解是否同时存在@AllArgsCons ...
- Consider defining a bean of type ‘XXX‘ in your configuration.
Consider defining a bean of type 'com.wxx.manger.mapper.GoodsCategoryMapper' in your configuration. ...
- 解决Consider defining a bean of type ‘XXX’ in your configuration.
报错原因:springboot自动注入,启动报错了. 没有找到对应的Bean的原因是@SpringBootApplication没有扫描到 Description:Field userEntityMa ...
最新文章
- 植物微生物组培养与重组技术:从描述性研究走向功能性研究
- 视图插入数据_用EXCEL作数据分析--招聘信息
- CMD命令之BAT脚本语法详解
- 如何在JavaScript中大写字符串的首字母
- DUTCTF 201x RE20
- 产品设计体会(7024)有关交互设计,读过的6本书
- Android之控件与布局,结构知识点,基础完结
- 用PHP编写提供性别的发法,第6节 Laravel-通过模型处理性别
- Sublime中文显示乱码
- 为什么我卸载了微博?
- 2.	Zigbee应用程序框架开发指南 - 应用程序框架结构
- python normalize函数_Python Wand normalize()用法及代码示例
- 【未来iPhone 手机中将加入卫星通信功能?】
- 乐高机器人走进图书馆活动方案_欢迎参加“乐高机器人创意搭建赛”活动
- C3+H5小案例 | 03 3D立体旋转相册
- 一个excel版进度管理软件的需求
- 运行零币Zcash(ZEC)
- LYNC客户端不显示通讯组里的用户的解决办法。
- linux与Windows下查看md5值
- SQL语句结合后台处理大量数据下的数据导出