From 53dcf54279a81a7747d89dc82b45bdea4f6faed9 Mon Sep 17 00:00:00 2001 From: lbw Date: Wed, 16 Aug 2023 23:03:12 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=20swagger-ui=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pig/gateway/config/SpringDocConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/SpringDocConfiguration.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/SpringDocConfiguration.java index 93b1ccb3..7b299217 100644 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/SpringDocConfiguration.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/config/SpringDocConfiguration.java @@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor; import org.springdoc.core.properties.AbstractSwaggerUiConfigProperties; import org.springdoc.core.properties.SwaggerUiConfigProperties; import org.springframework.beans.factory.InitializingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.context.annotation.Configuration; @@ -21,6 +22,7 @@ import java.util.stream.Collectors; */ @RequiredArgsConstructor @Configuration(proxyBeanMethods = false) +@ConditionalOnProperty("springdoc.api-docs.enabled") public class SpringDocConfiguration implements InitializingBean { private final SwaggerUiConfigProperties swaggerUiConfigProperties;