天天看点

解决IDEA中@Autowired抛红问题问题解决

问题

在IDEA中通过

@Autowired

注入时在变量名下方一直有红色的标记线进行提示

解决

  • 在IDEA中:File -> Settings 打开设置页面
  • 搜索

    inspections

    -> 搜索

    autowiring

    ->

    Autowiring for Bean Class

    -> 将

    Error

    修改为

    Warning

    -> 点击

    OK

继续阅读