一.问题描述
Idea的spring中,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示。但程序的编译和运行都是没有问题的。爆红看着总让人难受。

二、解决问题

找到如上位置:
1、(不推荐)在file中找到如下位置,这里可能因为版本问题显示的名字不一样
2、(推荐使用)右键寻找路径
(1)点击异常报告

(2)底部窗口中定位到你的异常位置

(3)右键鼠标选中【灯泡】Show Quick-Fxes (快捷键Ctrl+1)

(4) 选中列表第一个
(5)进入上面的位置
3、修改异常提示状态
建议改成:

三、大功告成!
