映射大量文件的正解,Description:Field commentMapper in zero.file.videoProject.controller.CommentController r

简介: 映射大量文件的正解,Description:Field commentMapper in zero.file.videoProject.controller.CommentController r

今天碰到了映射的问题:

Description:
 
Field commentMapper in zero.file.videoProject.controller.CommentController required a bean of type 'zero.file.videoProject.mappers.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 'zero.file.videoProject.mappers.CommentMapper' in your configuration.

英文翻译:

描述:
 
zero . file . video project . controller . comment controller中的字段commentMapper需要一个类型为“zero . file . video project . mappers . comment mapper”的bean,但找不到该bean。
 
注入点有以下注释:
-@ org . spring framework . beans . factory . annotation . auto wired(required = true)
 
 
行动:
 
请考虑在您的配置中定义一个“zero . file . video project . mappers . comment mapper”类型的bean。

解决问题方法,在springBoot的初始化页面中,就是Application这个文件,添加一个注解:

找到你的mappers映射文件路径,点击CopyPath

在springBoot添加一句这个,这个包的位置是你自己mappers映射的路

@MapperScan("zero.file.videoProject.mappers")

重新启动就好了


相关文章
|
8月前
|
存储
File操作 - list()/listFiles()与目录过滤器
File操作 - list()/listFiles()与目录过滤器
94 0
|
2月前
|
SQL JSON Java
【bug日记】已解决:Invalid bound statement (not found): 找不到对应的Mapper映射类
【bug日记】已解决:Invalid bound statement (not found): 找不到对应的Mapper映射类
|
Python
如何读取保存一些list信息的txt,生成有一组名字有规律的list
如何读取保存一些list信息的txt,生成有一组名字有规律的list
160 0
如何读取保存一些list信息的txt,生成有一组名字有规律的list
重构——29以数据类取代记录(Replace Record with Data Class)
以数据类取代记录(Replace Record with Data Class):你需要面对传统编程环境中的记录结构;为该记录创建一个“哑”数据对象
1534 0
|
JSON 数据格式
OData metadata 定义中,entity type key 的作用是什么
OData metadata 定义中,entity type key 的作用是什么
131 0
OData metadata 定义中,entity type key 的作用是什么
根据ABAP BAdI definition名称找到SPRO里配置路径的办法
根据ABAP BAdI definition名称找到SPRO里配置路径的办法
139 0
根据ABAP BAdI definition名称找到SPRO里配置路径的办法
|
XML 数据格式
使用simple transformation查找xml file内某个节点的attribute是否存在指定value
使用simple transformation查找xml file内某个节点的attribute是否存在指定value
120 0
使用simple transformation查找xml file内某个节点的attribute是否存在指定value