使用IDEA工具时使用@Resource和@Autowired自动注解bean时会显示红色,但是项目能运行
解决方法:
File – Settings – Inspections。在Spring Core – Autowring for Bean Class 中将Severity的级别由之前的error改成warning。

本文介绍在IDEA中使用@Resource和@Autowired自动注解bean时出现红色警告的问题及解决方案。通过调整设置,将Spring Core模块下Autowiring for Bean Class的Severity级别从error改为warning,即可消除IDEA的警告提示。
使用IDEA工具时使用@Resource和@Autowired自动注解bean时会显示红色,但是项目能运行
解决方法:
File – Settings – Inspections。在Spring Core – Autowring for Bean Class 中将Severity的级别由之前的error改成warning。

7514
2804

被折叠的 条评论
为什么被折叠?