This commit is contained in:
caixiang
2022-07-04 08:32:21 +08:00
parent 4c2e20bf0d
commit e5def9fb33
28 changed files with 1404 additions and 2 deletions

View File

@@ -86,6 +86,22 @@ public class SwaggerConfig {
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
@Bean
public Docket influxApi() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("ym-influx")
.apiInfo(apiInfos("influx", "influx模块"))
.useDefaultResponseMessages(true)
.forCodeGeneration(false)
.select()
.apis(RequestHandlerSelectors.basePackage("com.cnbm.influx"))
.paths(PathSelectors.any())
.build()
.securityContexts(Arrays.asList(securityContext()))
// ApiKey的name需与SecurityReference的reference保持一致
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
/**
* 创建该API的基本信息这些基本信息会展现在文档页面中
* 访问地址http://ip:port/swagger-ui.html