IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式

环境

  • ideaIU-2018.3.4.win;

错误提示:

Could not autowire. No beans of 'JwDsBaseinfoCaseMapper' type found. less... (Ctrl+F1) 
Inspection info:Checks autowiring problems in a bean class.

错误如下图:

idea-mapper-error-1.jpg

解决办法

对Mapper接口进行修改:

idea-mapper-error-2.jpg

修改后不再报错:

idea-mapper-error-3.jpg

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容