@@ -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 |
@@ -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<List<FlowRuleE | |||
String dataId=new StringBuilder(appName).append(NacosConstants.DATA_ID_POSTFIX).toString(); | |||
String rules = nacosConfiguration.getConfig(dataId,nacosProperties.getGroupId(),3000); | |||
//log.info("pull FlowRule from nacos Config:"+rules); | |||
if (rules.isEmpty()) { | |||
if (StringUtils.isEmpty(rules)) { | |||
return new ArrayList<>(); | |||
} else { | |||
return converter.convert(rules); | |||
@@ -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 | |||
@@ -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 | |||