【错误记录】springboot项目报错Field xxx in com.xx.xx.xx.impl.xxImpl required a bean
错误报告:
Description:
Field commentMapper in com.qc.qc_blog.service.impl.CommentServiceImpl required a bean of type 'com.qc.qc_blog.mapper.CommentMapper' 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.qc.qc_blog.mapper.CommentMapper' in your configuration.
这个错误的原因是Mapper下面的没有加上@Mapper注解 自动配置找不到文件
像下图这样将函数加上@Mapper的注解即可
2021.6.25 草稿箱整理
后记:
这个是前面写的草稿,但是在学习了maven项目的现在又觉得这是一个很浅显的问题了,但是关于service和implement的东西暂时还未弄明白,等后面再来整理和补充
【错误记录】springboot项目报错Field xxx in com.xx.xx.xx.impl.xxImpl required a bean相关推荐
- springboot 启动报错Field XXX required a bean of type XXX that could not be found的解决方案总结
1.检查 各个层的注解,尤其是Mapper层,看是否遗漏 @Mapper/@Repository 2.检查启动类注解,如若没问题,可加 @ComponentScan("需要扫描的包路径&qu ...
- 报错:Field userRepository in com.my.system.service.impl.UserServiceImpl required a bean of type ‘com.m
项目启动报错:Field userRepository in com.my.system.service.impl.UserServiceImpl required a bean of type 'c ...
- SpringBoot项目报错解决:“Error starting ApplicationContext. To display the conditions report re-run ...”
SpringBoot项目报错:Error starting ApplicationContext. To display the conditions report re-run your appli ...
- springboot项目报错:ERROR 9112 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] 的解决办法
启动springboot项目,访问页面后报错 报错信息如下: [nio-8087-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.ser ...
- Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type ‘com.sd.sbmb.dao.U
SpringBoot启动报错:Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type 'co ...
- Field xxxxDAO in com.nero.hua.service.impl.LoginServiceImpl required a bean of type
Field userDAO in com.nero.hua.service.impl.LoginServiceImpl required a bean of type 'com.nero.hua.da ...
- Field userInfoMapper in com.example.test.service.impl.UserServiceImpl required a bean of type ‘com.
Field userInfoMapper in com.example.test.service.impl.UserServiceImpl required a bean of type 'com.e ...
- springboot项目报错, 错误:找不到或无法加载主类com.xxx.xxx.Application
springboot项目报,错误:找不到或无法加载主类com.xxx.xxx.Application 1.打开配置设置Edit Configurations- 2.点击+号,找到spring boot ...
- Springboot 项目 报 Unknown column ‘xxx’ in ‘where clause’ 错误
项目 报 Unknown column 'xxx' in 'where clause' 错误 网上找了很多有以下几个方面 1. 列名不存在的结论,但是,很多时候起始并不是由于列名出错造成的.而是由于拼 ...
- 【错误记录】国际化报错 ( “xxx“ is not translated in “zh“ (Chinese) )
文章目录 一.报错信息 二.解决方案 一.报错信息 对应用进行国际化时报错 , 报错信息 : "xxx" is not translated in "zh" ( ...
最新文章
- PCIE BAR空间
- 使用AdMob实现广告统一
- Ubuntu安装VMware Tools的方法
- java中var是什么意思_js中的var是什么意思
- POSIX 消息队列相关问题
- Java高级语法笔记-普通异常处理
- Mysql 常用show命令
- Android的Widget桌面应用学习
- 第1章 数据库系统概论---数据库原理及应用
- PS2模拟器 PCSX2 新手向
- 前道道指令、后道道指令暨先天八卦指令、后天八卦指令
- 安科瑞预付费水电集团物业解决方案-Susie 周
- 9元包一年 阿里宝与腾讯王卡10G/月全国流量
- iPhone 各机型屏幕尺寸
- eclipes error
- 阿里王坚:用“机器智能”取代“人工智能”概念
- Python写接口api
- 库存出现负数 mysql_MySQL处理高并发,防止库存超卖库存出现负数
- Vue.js + axios 实现excel下载
- 从一个Aspectj织入失效问题的解决说起