在主启动类上添加 @MapperScanner注解,扫描mapper接口
不是springboot项目就创建一个配置类 再使用 @MapperScanner
有用请采纳,谢谢
mapper 上加一个@Repository 试试