瀏覽代碼

demo: Improve remoteAddress and groupId of sentinel-demo-nacos-datasource (#2134)

* Update NacosConfigSender.java
* Update NacosDataSourceDemo.java
* fix(Nacos Demo): remoteAddress error
master
yunan.zhang GitHub 3 年之前
父節點
當前提交
aef00c48ed
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. +2
    -2
      sentinel-demo/sentinel-demo-nacos-datasource/src/main/java/com/alibaba/csp/sentinel/demo/datasource/nacos/NacosConfigSender.java
  2. +2
    -2
      sentinel-demo/sentinel-demo-nacos-datasource/src/main/java/com/alibaba/csp/sentinel/demo/datasource/nacos/NacosDataSourceDemo.java

+ 2
- 2
sentinel-demo/sentinel-demo-nacos-datasource/src/main/java/com/alibaba/csp/sentinel/demo/datasource/nacos/NacosConfigSender.java 查看文件

@@ -26,8 +26,8 @@ import com.alibaba.nacos.api.config.ConfigService;
public class NacosConfigSender {

public static void main(String[] args) throws Exception {
final String remoteAddress = "localhost";
final String groupId = "Sentinel:Demo";
final String remoteAddress = "localhost:8848";
final String groupId = "Sentinel_Demo";
final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
final String rule = "[\n"
+ " {\n"


+ 2
- 2
sentinel-demo/sentinel-demo-nacos-datasource/src/main/java/com/alibaba/csp/sentinel/demo/datasource/nacos/NacosDataSourceDemo.java 查看文件

@@ -37,9 +37,9 @@ public class NacosDataSourceDemo {

private static final String KEY = "TestResource";
// nacos server ip
private static final String remoteAddress = "localhost";
private static final String remoteAddress = "localhost:8848";
// nacos group
private static final String groupId = "Sentinel:Demo";
private static final String groupId = "Sentinel_Demo";
// nacos dataId
private static final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
// if change to true, should be config NACOS_NAMESPACE_ID


Loading…
取消
儲存