启动类添加@MapperScan({"xxx.xxx.xxx.mapper","xxx.xxx.xxx.mapper"})
swagger配置类添加
@Bean public Docket api01() { return new Docket(DocumentationType.SWAGGER_2) //.enable(swagger_is_enabl) .apiInfo(new ApiInfoBuilder().title("你的title") .termsOfServiceUrl("NO terms of service") .license("The Apache License, Version 2.0") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .version("v1.0") .build()) .groupName("你的groupname") .pathMapping("/") .select() // 选择那些路径和api会生成document .apis(RequestHandlerSelectors.any())// 对所有api进行监控 .apis(RequestHandlerSelectors.basePackage("xxx.xxx.web.controller"))//你新的controller路径 .build(); }