From 4a11ee41471d557c36f99aecaa0f0dc0370dbd3c Mon Sep 17 00:00:00 2001 From: wangjx <1609724385@qq.com> Date: Sat, 26 Jun 2021 21:40:08 +0800 Subject: [PATCH] =?UTF-8?q?nacos=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- .../sentinel/dashboard/rule/nacos/FlowRuleNacosProvider.java | 3 ++- sentinel-dashboard/src/main/resources/bootstrap-test.yaml | 4 ++-- sentinel-dashboard/src/main/resources/bootstrap.yaml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f90c499..ad0643c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /et #EXPOSE 8098 #ENTRYPOINT java $JAVA_OPTS -jar /core.jar --spring.profiles.active=$active -ENTRYPOINT java $JAVA_OPTS -Dserver.port=7777 -Dcsp.sentinel.dashboard.server=$IP:7777 -Dproject.name=sentinel-dashboard -Dsentinel.dashboard.auth.username=sentinel -Dsentinel.dashboard.auth.password=sentinel -jar /app.jar --spring.profiles.active=$active +ENTRYPOINT java $JAVA_OPTS -Dserver.port=8098 -Dcsp.sentinel.dashboard.server=$IP:8098 -Dproject.name=sentinel-dashboard -Dsentinel.dashboard.auth.username=telpo -Dsentinel.dashboard.auth.password=telpo#1234 -jar /app.jar --spring.profiles.active=$active diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/FlowRuleNacosProvider.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/FlowRuleNacosProvider.java index d2a18ceb..cc250c73 100644 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/FlowRuleNacosProvider.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/FlowRuleNacosProvider.java @@ -20,6 +20,7 @@ import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity; import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider; import com.alibaba.csp.sentinel.datasource.Converter; import com.alibaba.nacos.api.config.ConfigService; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -51,7 +52,7 @@ public class FlowRuleNacosProvider implements DynamicRuleProvider(); } else { return converter.convert(rules); diff --git a/sentinel-dashboard/src/main/resources/bootstrap-test.yaml b/sentinel-dashboard/src/main/resources/bootstrap-test.yaml index 5397d61f..32927bc3 100644 --- a/sentinel-dashboard/src/main/resources/bootstrap-test.yaml +++ b/sentinel-dashboard/src/main/resources/bootstrap-test.yaml @@ -9,8 +9,8 @@ spring: file-extension: yaml sentinel: transport: - dashboard: 172.19.192.44:7777 - port: 8719 + dashboard: 172.19.192.44:8098 + port: 8098 datasource: - nacos: server-addr: 172.19.42.44:8848 diff --git a/sentinel-dashboard/src/main/resources/bootstrap.yaml b/sentinel-dashboard/src/main/resources/bootstrap.yaml index b0f73284..f49a0693 100644 --- a/sentinel-dashboard/src/main/resources/bootstrap.yaml +++ b/sentinel-dashboard/src/main/resources/bootstrap.yaml @@ -9,7 +9,7 @@ spring: file-extension: yaml sentinel: transport: - dashboard: 172.19.192.44:7777 + dashboard: 172.19.192.44:8098 datasource: - nacos: server-addr: 172.19.42.44:8848