首页 > 技术文章 > IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式

cobcmw 2019-04-09 12:47 原文

转载请注明来源:四个空格 » 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.

错误如下图:

解决办法

对Mapper接口进行修改:

修改后不再报错:

转载请注明来源:四个空格 » IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式

推荐阅读