Consider defining a bean of type 'top.autuan.example.mapper.MemberMapper' in your configuration.

Mapper中的bean不在Spring管理类中

Posted by Autuan.Yu on January 28, 2022

正确的结果,是从大量错误中得出来的;没有大量错误作台阶,也就登不上最后正确结果的高座。

错误描述

Action:
Consider defining a bean of type 'top.autuan.example.mapper.MemberMapper' in your configuration. 

解决

检查启动类 @MapperScan 或配置文件中的 Mapper 扫描,位置 top.autuan.example.mapper 包位置是否正确。