IntelliJ Idea 解决 Could not autowire. No beans of 'xxxx' type found 的错误提示

如果出现了该错误但并不影响运行的话,则原因可能是 Intellij IDEA 工具本身的问题。IDEA 可以理解 Spring 的上下文,这个是因为 它是 MyBatis 的接口,不认识。

解决方法:

降低Autowired检测的级别,将Severity的级别由之前的error改成warning或其它可以忽略的级别。

IntelliJ Idea 解决 Could not autowire. No beans of 'xxxx' type found 的错误提示