解决方法:需要修改SpringBoot启动类上的Mpper文件扫描注解的包名,调整包名到mapper文件所在的目录位置,例如: @MapperScan(basePackages = "com.xxx.xxx.modules.*.mapper")