IntelliJ idea 报错:Could not autowire,no beans of "XXX" type found

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IntelliJ idea 报错:Could not autowire,no beans of "XXX" type found相关的知识,希望对你有一定的参考价值。

Question:使用 IDEA 开发Java web项目时,在注解 @Autowired 装配 dao 时显示:Could not autowire,no beans of "XXX" type found。

Measures:① 在@Autowired 注解下面添加上 @SuppressWarnings("SpringJavaAutowiringInspection")

       ② 降低 Autowired 检测的级别,将 Severity 的级别由之前的 error 改成 warning 或其它可以忽略的级别。

       详情如下:

技术分享图片

推荐使用第一种,更合理。

踩坑参考:

    http://blog.csdn.net/u010334295/article/details/78076510

 

以上是关于IntelliJ idea 报错:Could not autowire,no beans of "XXX" type found的主要内容,如果未能解决你的问题,请参考以下文章

IntelliJ Idea解决Could not autowire. No beans of 'xxxx' type found的错误提示

IntelliJ Idea取消Could not autowire. No beans of 'xxxx' type found的错误提示

错误记录IntelliJ IDEA 编译 Groovy 报错 ( Could not open/create prefs root node SoftwareJavaSoftPrefs )

Intellij IDEA报错:Could not save application settings: java.io.IOException: java.lang.AssertionError:

intellij idea更新gradle项目报错:Could not run build action using Gradle distribution

错误记录IntelliJ IDEA 编译 Groovy 报错 ( GroovyRuntimeException: This script or class could not be run. )