@Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket userApi() { Docket docket = new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.xxx.controller"))//过滤的接口 .paths(PathSelectors.any()) .build(); return docket; } private ApiInfo apiInfo() { return new ApiInfoBuilder().title("xxx").description("xxx服务") .termsOfServiceUrl("http://www.xxx.com/") .license("Licence Version 1.0") .licenseUrl("#") .version("1.0").build(); } }
01-12
4647
10-02
1806