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相关推荐

  1. Consider defining a bean of type ‘Mapper‘ in your configuration.

    错误信息 14:42:02.320 [restartedMain] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisR ...

  2. springboot 工程启动报错之Consider defining a bean of type ‘XXX’ in your configuration.

    一.前言: 使用springboot自动注入的方式搭建好了工程,结果启动的时候报错了!!!,错误如下图: Description:Field userEntityMapper in com.xxx.x ...

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

  4. springboot启动报错: Consider defining a bean of type ‘XXX‘ in your configuration

    Consider defining a bean of type 'XXX' in your configuration 出现这个错误,要看看你是否用到了某些组件,但是启动类上没加相应的注解.比如说我 ...

  5. 【无法找到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 ...

  6. SpringBoot 出现 Consider defining a bean of type ‘xxx‘ in your configuration 问题解决方案

    大家好,我是trikey. 最近在编写练手项目代码时,出现了Consider defining a bean of type 'xxx' in your configuration 问题,这里简单记录 ...

  7. 解决启动报错Consider defining a bean of type ‘xxx‘ in your configuration.

    解决启动报错Consider defining a bean of type 'xxx' in your configuration. 报错截图 解决方法:查看注解是否同时存在@AllArgsCons ...

  8. Consider defining a bean of type ‘XXX‘ in your configuration.

    Consider defining a bean of type 'com.wxx.manger.mapper.GoodsCategoryMapper' in your configuration. ...

  9. 解决Consider defining a bean of type ‘XXX’ in your configuration.

    报错原因:springboot自动注入,启动报错了. 没有找到对应的Bean的原因是@SpringBootApplication没有扫描到 Description:Field userEntityMa ...

最新文章

  1. 植物微生物组培养与重组技术:从描述性研究走向功能性研究
  2. 视图插入数据_用EXCEL作数据分析--招聘信息
  3. CMD命令之BAT脚本语法详解
  4. 如何在JavaScript中大写字符串的首字母
  5. DUTCTF 201x RE20
  6. 产品设计体会(7024)有关交互设计,读过的6本书
  7. Android之控件与布局,结构知识点,基础完结
  8. 用PHP编写提供性别的发法,第6节 Laravel-通过模型处理性别
  9. Sublime中文显示乱码
  10. 为什么我卸载了微博?
  11. 2. Zigbee应用程序框架开发指南 - 应用程序框架结构
  12. python normalize函数_Python Wand normalize()用法及代码示例
  13. 【未来iPhone 手机中将加入卫星通信功能?】
  14. 乐高机器人走进图书馆活动方案_欢迎参加“乐高机器人创意搭建赛”活动
  15. C3+H5小案例 | 03 3D立体旋转相册
  16. 一个excel版进度管理软件的需求
  17. 运行零币Zcash(ZEC)
  18. LYNC客户端不显示通讯组里的用户的解决办法。
  19. linux与Windows下查看md5值
  20. SQL语句结合后台处理大量数据下的数据导出

热门文章

  1. 仿GPS的4星定位程序
  2. 梯度下降(Gradient descent)算法详解
  3. 12.自媒体文章-自动审核
  4. IDEA 常用配置与使用
  5. 关于计算机英语作文60词,关于计算机的英语作文
  6. Yapi接口一键生成Java代码
  7. vue导出excel表格,自定义字体样式,字体颜色,合并单元格,单元格填充色-xlsx以及xlsx-style,JSZip为2.XX版本
  8. 第0天 无人问津 --人生得意须尽欢,莫使金樽空对月 《游记80天》
  9. 【八股文】5 My Batis
  10. 蓝桥杯Python—闰年判断