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. Tomcat(五):Tomcat 参数调优教程
  2. 互联网技术架构的启示
  3. WordPress Kyma插件里Connect和disconnect按钮的动态显示逻辑
  4. c++中堆、栈内存分配概念示例讲解
  5. Linux服务器重启后crs_stat -t 命令无法正常使用以及解决思路
  6. #10010 「一本通 1.1 练习 6」糖果传递 (数学+贪心)
  7. 计算机在岗位上的应用,计算机岗位应用论文.doc
  8. Positional Encodings in ViTs 近期各视觉Transformer中的位置编码方法总结及代码解析 1
  9. linux用java连接mysql_Java使用JDBC方式连接数据库
  10. 设计模式(二):难忘一次分享盛宴
  11. 关于es6中新增的一些方法----数组篇
  12. NetTiers学习笔记12---deepload的递归
  13. Redis 官方可视化工具,高颜值,功能太强大!
  14. 基于用户的协同过滤推荐算法研究
  15. 力扣(leetcode)279. 完全平方数——c语言新手入门
  16. 有些软件,听着听着就没了...
  17. webbrowser1 脚本报错_webbrowser脚本错误的解决办法
  18. 总结:IP地址、网络地址与子网掩码的理解
  19. Dedecms 5.7 SP2后台广告管理处getshell
  20. 蓝色音箱改装电源_神改装:用小度音箱改装DIY音频AUX口,结局是大跌眼镜

热门文章

  1. 不直播不露脸也能做短视频变现,想挣点生活费试试这些玩法
  2. MT8163 Android 6.0 调试光感IC(STK3310)总结
  3. esp8266局域网连接控制电机运动
  4. 软件测试能干到死,但说能干到退休,我就呵呵…
  5. 直播app与微信qq同时占用麦克风,或者播放音乐时来电,解决麦克风冲突
  6. mysql 插入中文数据显示 ? 号解决办法
  7. 从走到跑 王秀娟的坚守
  8. 网店编辑人员的实战技巧作战
  9. JS设计模式——装饰器模式
  10. 设置HTML中字体的粗细