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

View File

@@ -37,4 +37,18 @@ spring:
# driver-class-name: org.postgresql.Driver
# url: jdbc:postgresql://123456:5432/renren_security
# username: postgres
# password: 123456
# password: 123456
influx:
url: http://192.168.0.170:8086 # URL to connect to InfluxDB.
username: caixiang # Username to use in the basic auth.
password: 251128856 # Password to use in the basic auth.
token: lkBsC27QZr1W50BSPlGxpTqNNpwuUk5uz1dZZRPSPbCG5VmNDDUo8P3UkZIhGWwfJwkuz6ZGZ7Et4_KBaG3gHw== # Token to use for the authorization.
org: qgs # Default destination organization for writes and queries.
bucket: qgs-bucket # Default destination bucket for writes.
logLevel: BODY # The log level for logging the HTTP request and HTTP response. (Default: NONE)
readTimeout: 5s # Read timeout for OkHttpClient. (Default: 10s)
writeTimeout: 5s # Write timeout for OkHttpClient. (Default: 10s)
connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
# management.health.influx.enabled=true # Whether to enable InfluxDB 2.x health check.

View File

@@ -73,4 +73,5 @@ mybatis-plus:
logging:
level:
com.cnbm.admin.dao: DEBUG
com.cnbm.admin.dao: DEBUG