IDEA使用教程七(@Autowired 代码检查报错)

1. 问题

  IntelliJ IDEA 对@Autowired代码检查报错。

IDEA使用教程七(@Autowired 代码检查报错)

 2. 解决:修改IntelliJ IDEA 代码查检级别。

File — Settings

在Editor --> Inspections中, 修改Spring Core --> Code --> Autowiring for Bean Class

需要从Error改为Warning

IDEA使用教程七(@Autowired 代码检查报错)