Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhuyy 2023-02-01 10:56:43 +08:00
commit 8de1f7891e
2 changed files with 20 additions and 4 deletions

View File

@ -27,9 +27,9 @@ public class SwaggerConfig {
this.openApiExtensionResolver = openApiExtensionResolver;
}
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
@Bean(value = "defaultApi1")
public Docket defaultApi1() {
String groupName="系统管理";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("http://www.ydool.com/")
.apiInfo(apiInfo())
@ -43,6 +43,22 @@ public class SwaggerConfig {
return docket;
}
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="人事管理";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("http://www.ydool.com/")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.ydool.staff.controller"))
.paths(PathSelectors.any())
.build()
//赋予插件体系
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("接口文档系统")
.description("接口文档系统")

View File

@ -16,7 +16,7 @@ spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://10.0.0.20:3306/lc_oa?useSSL=false&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
url: jdbc:mysql://10.0.0.200:3306/lc_oa?useSSL=false&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: lc_oa
password: wZxxeSJjtTzT2iAk
druid: