From b25fd6fd75c2a8ac51cc245f3b28202b456b8aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 17 Aug 2022 13:44:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20web=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=20=E4=B8=8D=E5=BC=95=E5=85=A5nacos=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/web/config/NacosConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/NacosConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/NacosConfig.java index d82ed13d..08e38433 100644 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/NacosConfig.java +++ b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/NacosConfig.java @@ -8,6 +8,7 @@ import com.alibaba.cloud.nacos.discovery.NacosDiscoveryClientConfiguration; import com.alibaba.cloud.nacos.discovery.NacosWatch; import com.ruoyi.common.web.nacos.CustomNacosWatch; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.cloud.client.ConditionalOnBlockingDiscoveryEnabled; import org.springframework.cloud.client.ConditionalOnDiscoveryEnabled; @@ -18,6 +19,7 @@ import org.springframework.context.annotation.Bean; * * @author Lion Li */ +@ConditionalOnClass(NacosWatch.class) @AutoConfiguration( before = NacosDiscoveryClientConfiguration.class, after = NacosDiscoveryAutoConfiguration.class