idea报错 Could not autowire. No beans of ‘XXXMapper‘ type found. less... (Ctrl+F1)

idea报错 Could not autowire. No beans of ‘XXXMapper‘ type found. less... (Ctrl+F1)

在项目中遇到这种现象,但是程序运行起来也没事。但是看起来就是别扭

产生的原因:

sping auto scan配置在编辑情况下,无法找到对应的bean,此时会提示该错误

解决方法

file---setting---inspections---spring core --- core --- 修改为 Warning + In All Scopes

idea报错 Could not autowire. No beans of ‘XXXMapper‘ type found. less... (Ctrl+F1)