IntelliJ IDEA shows errors when using Spring's @Autowired annotation

前端 未结 26 2451
栀梦
栀梦 2020-12-07 15:40

IntelliJ IDEA is showing errors when I use Spring\'s @Autowired annotation in the class, but the class is functioning without any problem.

Here is this

26条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 15:55

    Make sure you have your Spring bean definitions correct. Sometimes, the application works fine, it just displays an error in the IDE, check your project ‘iml’ file if you have a Spring facet defined.

提交回复
热议问题