IDEA报错Could not autowire. No beans of 'UserMapper' type found.

在这里插入图片描述
我使用的idea2017 在学习mybatis 中我的 TestController 文件中有一个报错,但是其中总有一个报错,这是因为他的上面的标签 @Autowired 的设置问题

解决方法:

Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class - disable(idea2017是把√去掉)
在这里插入图片描述

发布了71 篇原创文章 · 获赞 14 · 访问量 5613

猜你喜欢

转载自blog.csdn.net/flying_hengfei/article/details/102872740