初始化
This commit is contained in:
parent
260ac66935
commit
80d41bbc26
|
@ -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("接口文档系统")
|
||||
|
|
Loading…
Reference in New Issue