From c80a7698101d3a27f5e40fe83ba1302758c55dd5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 三月 2025 16:37:30 +0800
Subject: [PATCH] ll
---
server/system_gateway/src/main/java/com/doumee/config/swagger/SwaggerConfig.java | 44 ++++++--------------------------------------
1 files changed, 6 insertions(+), 38 deletions(-)
diff --git a/server/system_gateway/src/main/java/com/doumee/config/swagger/SwaggerConfig.java b/server/system_gateway/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
index 1a237ee..a04545a 100644
--- a/server/system_gateway/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
+++ b/server/system_gateway/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
@@ -28,6 +28,8 @@
@Value("${swagger.host:}")
private String host;
+ @Value("${swagger.enabled:}")
+ private Boolean enabled;
@Value("${swagger.title:鎺ュ彛鏂囨。}")
private String title;
@@ -47,53 +49,19 @@
.build();
}
@Bean
- public Docket getDocket() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(this.getApiInfo()).groupName("銆愮郴缁熺鐞嗘帴鍙PI銆�")
- .host(host)
- .select()
- .apis( basePackage("com.doumee.api.system;"))
- // 璁剧疆闇�瑕佽鎵弿鐨勭被锛岃繖閲岃缃负娣诲姞浜咢Api娉ㄨВ鐨勭被
-// .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
- .paths(PathSelectors.any())
- .build();
- }
- @Bean
public Docket getDocket2() {
return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(this.getApiInfo()).groupName("銆愪笟鍔$鐞嗘帴鍙PI銆�")
+ .apiInfo(this.getApiInfo()).groupName("default")
.host(host)
+ .enable(enabled)
.select()
- .apis( basePackage("com.doumee.api.business;"))
+ .apis( basePackage("com.doumee.api.gateway;"))
// 璁剧疆闇�瑕佽鎵弿鐨勭被锛岃繖閲岃缃负娣诲姞浜咢Api娉ㄨВ鐨勭被
// .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any())
.build();
}
- @Bean
- public Docket getDocket4() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(this.getApiInfo()).groupName("銆愬畾鏃朵换鍔℃帴鍙PI銆�")
- .host(host)
- .select()
- .apis( basePackage("com.doumee.api.timer;"))
- // 璁剧疆闇�瑕佽鎵弿鐨勭被锛岃繖閲岃缃负娣诲姞浜咢Api娉ㄨВ鐨勭被
-// .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
- .paths(PathSelectors.any())
- .build();
- }
- @Bean
- public Docket getDocket1() {
- return new Docket(DocumentationType.SWAGGER_2)
- .apiInfo(this.getApiInfo()).groupName("銆愬叕鍏辨帴鍙PI銆�")
- .host(host)
- .select()
- .apis( basePackage("com.doumee.api.common"))
- // 璁剧疆闇�瑕佽鎵弿鐨勭被锛岃繖閲岃缃负娣诲姞浜咢Api娉ㄨВ鐨勭被
-// .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
- .paths(PathSelectors.any())
- .build();
- }
+
/**
* 閲嶅啓basePackage鏂规硶锛屼娇鑳藉瀹炵幇澶氬寘璁块棶锛屽鍒惰创涓婂幓
* @author teavamc
--
Gitblit v1.9.3