demo: Improve remoteAddress and groupId of sentinel-demo-nacos-datasource (#2134)
* Update NacosConfigSender.java * Update NacosDataSourceDemo.java * fix(Nacos Demo): remoteAddress error
This commit is contained in:
parent
00a560bd00
commit
aef00c48ed
|
|
@ -26,8 +26,8 @@ import com.alibaba.nacos.api.config.ConfigService;
|
||||||
public class NacosConfigSender {
|
public class NacosConfigSender {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
final String remoteAddress = "localhost";
|
final String remoteAddress = "localhost:8848";
|
||||||
final String groupId = "Sentinel:Demo";
|
final String groupId = "Sentinel_Demo";
|
||||||
final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
|
final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
|
||||||
final String rule = "[\n"
|
final String rule = "[\n"
|
||||||
+ " {\n"
|
+ " {\n"
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ public class NacosDataSourceDemo {
|
||||||
|
|
||||||
private static final String KEY = "TestResource";
|
private static final String KEY = "TestResource";
|
||||||
// nacos server ip
|
// nacos server ip
|
||||||
private static final String remoteAddress = "localhost";
|
private static final String remoteAddress = "localhost:8848";
|
||||||
// nacos group
|
// nacos group
|
||||||
private static final String groupId = "Sentinel:Demo";
|
private static final String groupId = "Sentinel_Demo";
|
||||||
// nacos dataId
|
// nacos dataId
|
||||||
private static final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
|
private static final String dataId = "com.alibaba.csp.sentinel.demo.flow.rule";
|
||||||
// if change to true, should be config NACOS_NAMESPACE_ID
|
// if change to true, should be config NACOS_NAMESPACE_ID
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue