diff --git a/km-console/pom.xml b/km-console/pom.xml
index 76201e592..eef868e81 100644
--- a/km-console/pom.xml
+++ b/km-console/pom.xml
@@ -32,8 +32,8 @@
v12.22.12
6.14.16
- https://npm.taobao.org/mirrors/node/
- https://registry.npm.taobao.org/npm/-/
+ https://npmmirror.com/mirrors/node/
+ https://registry.npmmirror.com/npm/-/
diff --git a/km-rest/src/main/java/com/xiaojukeji/know/streaming/km/rest/config/WebConfig.java b/km-rest/src/main/java/com/xiaojukeji/know/streaming/km/rest/config/WebConfig.java
index 12f34aa37..7409119e8 100644
--- a/km-rest/src/main/java/com/xiaojukeji/know/streaming/km/rest/config/WebConfig.java
+++ b/km-rest/src/main/java/com/xiaojukeji/know/streaming/km/rest/config/WebConfig.java
@@ -6,6 +6,7 @@
import com.xiaojukeji.know.streaming.km.common.utils.GitPropUtil;
import com.xiaojukeji.know.streaming.km.rest.interceptor.PermissionInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;
@@ -24,6 +25,9 @@ public class WebConfig implements WebMvcConfigurer {
private static final String FE_INDEX_PAGE_HTML = "layout/index";
+ @Value(value = "${swagger.enabled:true}")
+ private Boolean swaggerEnabled;
+
@Override
public void addViewControllers(ViewControllerRegistry registry) {
// FE-首页
@@ -69,7 +73,7 @@ public Docket createRestApi() {
RequestHandlerSelectors.basePackage("com.didiglobal.logi.security.controller")))
.paths(PathSelectors.any())
.build()
- .enable(true);
+ .enable(swaggerEnabled != null && swaggerEnabled);
}
private ApiInfo apiInfo() {
diff --git a/km-rest/src/main/resources/application.yml b/km-rest/src/main/resources/application.yml
index 40152cdda..6a59f4a8c 100644
--- a/km-rest/src/main/resources/application.yml
+++ b/km-rest/src/main/resources/application.yml
@@ -115,4 +115,7 @@ management:
descriptions: true
enabled: true
tags:
- application: know-streaming
\ No newline at end of file
+ application: know-streaming
+
+swagger:
+ enabled: true