[EEROR]Spring整合Mybatis自动编入IDEA报错Could not autowire. No beans of 'UserMapper' type found.

在使用IDEA的过程中,测试Spring整合Mybatis,出现报错Could not autowire. No beans of 'UserMapper' type found.

[EEROR]Spring整合Mybatis自动编入IDEA报错Could not autowire. No beans of 'UserMapper' type found.

在检查xml文件的包名没有错误之后,找到解决方案如下:

在File中打开settings后,修改如下配置

[EEROR]Spring整合Mybatis自动编入IDEA报错Could not autowire. No beans of 'UserMapper' type found.

取消绿色框处部分的勾选。