关于mybatis-plus中调用mapper报错的问题

mybatis升mybatis-plus时遇到的问题
访问xml中自定义的方法时没问题,访问IService里面的方法时报错

img

配置

img

img

img

img

img

interface上少一个mapper注解吧,而且你主启动类应该也没有mapperScan

1.mapper缺少 @Repository注解

2.在配置文件 添加
mybatis-plus:
type-aliases-package: wss.com.mapper # 你的mapper
mapper-locations: classpath*:/mapper/*Mapper.xml

mybatis-plus 建议使用 @select注解 配合 queryWraper 形式 真的很方便

没有对javaMapper指定扫描目录吧

能不能把自定义的方法截个图看看,看上去是方法定义有问题

1.启动类指定@MapperScan,mapper的包路径
2.mybatis-plus:
mapper-locations: classpath:/mappers/*Mapper.xml,yml文件执行mapperxml文件位置