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