Intellij Idea上做 Spring Boot + mybatis项目。

一直提示 Could not Autowire. 虽然不影响工作,但心理抓狂。
20171226150158820.png
Google很多人提出修改 spring 的 Could not autowire 的报警等级。但是治标不治本。 如下图:
1088218-20170517101022150-550693875.png

根本上能够解决办法:在每个mapper接口上添加

@Repository注解,瞬间解决!
Image.png

标签: none

添加新评论