问题
在IDEA中通过
@Autowired
注入时在变量名下方一直有红色的标记线进行提示
解决
- 在IDEA中:File -> Settings 打开设置页面
- 搜索
-> 搜索inspections
->autowiring
-> 将Autowiring for Bean Class
修改为Error
-> 点击Warning
OK
在IDEA中通过
@Autowired
注入时在变量名下方一直有红色的标记线进行提示
inspections
-> 搜索 autowiring
-> Autowiring for Bean Class
-> 将 Error
修改为 Warning
-> 点击 OK