【踩坑专栏】required a bean of type ‘xxx.UserConverter‘ that could not be found
在使用mapstruct的时候,遇到了如题的报错。
问题很简单,是说找不到这个bean,没有注入spring容器,但是我在mapstruct接口上已经有了如下注解,却报错了
@Mapper
@Component
解决办法就是Mapper上要加属性,指明加入spring才行。而这时,已经完成了注入spring的功能,但是如果只有这个@Mapper(componentModel = "spring")
,在注入Converter的时候会编译警告说这个没注入进来,其实已经注进来了,不想看到这个警告就加一个@Component
就可以。
@Component
@Mapper(componentModel = "spring")
【踩坑专栏】required a bean of type ‘xxx.UserConverter‘ that could not be found相关推荐
- springboot踩坑日记——Field xxx.xxx.xxx required a bean of type 'xxx.xxx.xxx' that could not be found
使用feign时报创建的feign接口找不到 Field xxx.xxx.xxx required a bean of type 'xxx.xxx.xxx' that could not be fou ...
- springboot使用junit单元测试是发生报错 Field taskUtils in com.xxx.xxx.xxxx.xxx required a bean of type 'xxx.xxx.
使用junit单元测试mybatis时发生如下错误 Error starting ApplicationContext. To display the conditions report re-run ...
- 使用Feign服务远程调用项目启动时报错:Field xxx in xxx required a bean of type xxx that could not be found.
报错: *************************** APPLICATION FAILED TO START ***************************Description:F ...
- A component required a bean of type ‘XXX‘ that could not be found 解决办法
springboot应用启动的时候,bean的加载扫描失败,错误信息如下A component required a bean of type 'XXX' that could not be foun ...
- Parameter 1 of constructor in xxx required a bean of type xxx‘ that could not be found.已经解决
使用Mybatis Plus 时遇到问题Parameter 1 of constructor in xxx required a bean of type xxx' that could not be ...
- 关于解决required a bean of type ‘XXX’ that could not be found.的问题
解决required a bean of type 'XXX' that could not be found.的问题 本人java菜鸟一枚,最近在新做的springboot里面关于无法注入Bean的 ...
- 解决:Parameter 0 of constructor in xxx required a bean of type ‘xxx‘ that could not be found.
运行报错: Parameter 0 of constructor in com.xxx.Crawler required a bean of type 'java.lang.String' that ...
- 解决:Parameter 0 of constructor in XXX required a bean of type ‘XXX‘ that could not be found
解决:Parameter 0 of constructor in com.mise.smart.entity.HrmNoticeEntity required a bean of type 'java ...
- springboot启动失败 required a bean of type ‘XXX‘ not be found
改造老项目时出现注入失败问题 Description: Field httpclient in com.cn.XXX.user.business.impl.UserBusinessImpl requi ...
最新文章
- Oracle CDC (Change Data Capture)更新数据捕获——概述
- 在Windows Server 2012 R2中搭建SQL Server 2012故障转移集群
- 【渝粤教育】国家开放大学2018年秋季 0695-21T (1)农业企业经营管理 参考试题
- HYSBZ - 1101——莫比乌斯反演
- Mybatis(6)CURD增删改查操作
- struts2 OGNL表达式
- How to get the android resolution
- echarts的pie图中,各区块颜色的调整
- linux系统虚拟机gcc下载,Linux(Ubuntu)虚拟机安装GCC编译器
- 关于:在 Office 2021 中自定义模板
- 32位计算机怎么安装ps,我可以在64位系统上安装32位Photoshop吗?
- safari遮罩无效
- 详解深度学习中的梯度消失、爆炸原因及其解决方法
- 我的web前端工作日记2------web前端工作的一天
- 英剧推荐【IT狂人】
- gii无法访问 yii2_YII2框架访问gii、debug页面404的错误解决方法
- Windows安装mysql及图形化界面navicat
- 关于HOOK,如何通过钩子截获指定窗口的所有消息
- Firefox 的用户脚本管理器 greasemonkey 的使用一例
- STM32F0 ADC学习