springfox-swagger2 创建新的group,只需要实例化一个新的Docket实例,配置groupName,在请求时。使用/v2/api-docs?group=test就可以请求这个group对应的swagger json。
@Bean
public Docket customImplementation() {
ApiInfo apiInfo = ApiInfo.DEFAULT;
apiInfo = new ApiInfo(apiInfo.getTitle(), "my descript", apiInfo.getVersion(),
apiInfo.getTermsOfServiceUrl(), apiInfo.getContact(), apiInfo.getLicense(), apiInfo.getLicenseUrl());
return new Docket(DocumentationType.SWAGGER_2)
.groupName("test")
.apiInfo(apiInfo);
}