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

转载请注明来源:四个空格 » 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注入报错的正确解决方式

原文地址:https://www.cnblogs.com/cobcmw/p/10676203.html