This commit is contained in:
caixiang
2023-02-14 09:08:21 +08:00
parent e0a947f050
commit 9d75942afb
74 changed files with 9435 additions and 2 deletions

View File

@@ -54,6 +54,22 @@ public class SwaggerConfig {
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
@Bean
public Docket packingApi() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("ym-packing")
.apiInfo(apiInfo("包装模块", "V1"))
.useDefaultResponseMessages(true)
.forCodeGeneration(false)
.select()
.apis(RequestHandlerSelectors.basePackage("com.cnbm.packing"))
.paths(PathSelectors.any())
.build()
.securityContexts(Arrays.asList(securityContext()))
// ApiKey的name需与SecurityReference的reference保持一致
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
@Bean
public Docket adminApi() {
return new Docket(DocumentationType.SWAGGER_2)
@@ -69,6 +85,21 @@ public class SwaggerConfig {
// ApiKey的name需与SecurityReference的reference保持一致
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
@Bean
public Docket s7Api() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("ym-s7")
.apiInfo(apiInfo("基于西门子S7协议采集模块", "基于西门子S7协议采集模块"))
.useDefaultResponseMessages(true)
.forCodeGeneration(false)
.select()
.apis(RequestHandlerSelectors.basePackage("com.cnbm.s7"))
.paths(PathSelectors.any())
.build()
.securityContexts(Arrays.asList(securityContext()))
// ApiKey的name需与SecurityReference的reference保持一致
.securitySchemes(Arrays.asList(new ApiKey("token", "token", "header")));
}
/**
* 创建该API的基本信息这些基本信息会展现在文档页面中