解决Idea 出现 "Could not autowire.." 错误

解决Idea 出现 “Could not autowire..” 错误

在使用idea过程中出现了”could not autowire,no Beans of ‘XXX’ found “错误。在项目正常运行的情况下依然报此错误。现将解决方案记录如下

  1. 打开file-settings
    解决Idea 出现 "Could not autowire.." 错误

  2. 打开editor->inspections
    解决Idea 出现 "Could not autowire.." 错误

  3. 右侧搜索框中输入 spring core ,如下图
    解决Idea 出现 "Could not autowire.." 错误

  4. 选中Autowiring for Bean Class ,将Severity级别改为Warning
    解决Idea 出现 "Could not autowire.." 错误

  5. 最后点击 apply应用,问题解决