需要在springboot 启动类上加入@mapperScan("") 注解,括号是mapper的包路径
@SpringBootApplication @MapperScan("com.qiyun.test.mapper")