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

 

文章来自:http://www.cnblogs.com/boyce-yuan/p/7979136.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3