首页 > 其他 > 详细

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

时间:2017-12-04 22:12:00      阅读:2764      评论:0      收藏:0      [点我收藏+]

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

原文:http://www.cnblogs.com/boyce-yuan/p/7979136.html

(1)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!