Could not autowire. No Beans of...

环境:
IDEA开发工具+Spring Boot+Mybatis+TkMybatis。

问题

由于Mapper是由tkmybatis负责扫描的,有可能IDEA不能识别,所以提示错误了。

Could not autowire. No Beans of..._第1张图片
问题

解决方法

方式1:
在偏好设置里-->Inspections-->Spring-->Severity,设置为Warning,之前是Error。

Could not autowire. No Beans of..._第2张图片
方式1

这种方式算是治标不治本,只是把烦人的错误提示下波浪线去掉了,
期待大家补充方式2.

你可能感兴趣的:(Could not autowire. No Beans of...)