博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用Mybatis-Plus时,注入mapper提示Could not autowire. No beans of ‘xxxMapper‘ type found.
阅读量:3948 次
发布时间:2019-05-24

本文共 370 字,大约阅读时间需要 1 分钟。

使用Mybatis-Plus时,注入mapper提示Could not autowire. No beans of 'xxxMapper' type found.的解决方案

如图

Could not autowire. No beans of 'xxxMapper' type found.

Tips

此报红不影响项目的正常运行 
1

解决方案

  1. 降低IDEA报错的等级
    把Error改成Warning或者其他
    虽然依然提示Could not autowire,但是不报红虽然依然提示Could not autowire,但是不报红

2.在Mapper接口上添加 @Component(value = “xxxMapper”)注解

在Mapper接口上添加@Component注解
此时就不再提示Could not autowire. No beans of ‘xxxMapper’ type found。不再提示Could not autowire

原文链接:https://blog.csdn.net/qq_37156367/article/details/107953248

看到最后的帮忙

点个👍🙏 谢谢,这个对我真的很重要!

在这里插入图片描述

你可能感兴趣的文章
boost1.43在win7下的编译
查看>>
VC++工程如何脱离VSS环境
查看>>
转 hook 自绘原理
查看>>
NSIS 脚本介绍
查看>>
记录通讯日志的函数
查看>>
c++ 标准容器介绍与对比
查看>>
web DB优化思路
查看>>
敏捷笔记
查看>>
SOA业务理解与应用
查看>>
Google File System(中文翻译)
查看>>
Google's BigTable 原理 (翻译)
查看>>
MapReduce:超大机群上的简单数据处理
查看>>
设计模式笔记(转载)
查看>>
加站点加入IE的可信站点做法
查看>>
软件研发中的《破窗理论》
查看>>
敏捷的三种误区和五种改进
查看>>
用数字来看某知名B2C网站的发展内幕和隐私
查看>>
vs2010一些设置
查看>>
生活感悟语录
查看>>
用python中htmlParser实现的spider(python spider)
查看>>