From 254c432cede1f0c7fd09ac3a3d841a3bdf5ebeb1 Mon Sep 17 00:00:00 2001 From: liubao Date: Mon, 23 Oct 2023 16:30:28 +0800 Subject: [PATCH] [SCB-2813]fix config value error --- .../java/org/apache/servicecomb/config/nacos/NacosConfig.java | 4 ++-- .../servicecomb/registry/nacos/NacosDiscoveryProperties.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosConfig.java b/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosConfig.java index 76a8ebfeecf..8963bd75c2d 100644 --- a/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosConfig.java +++ b/dynamic-config/config-nacos/src/main/java/org/apache/servicecomb/config/nacos/NacosConfig.java @@ -32,7 +32,7 @@ public class NacosConfig { public static final String PROPERTY_USERNAME = "servicecomb.nacos.username"; - public static final String PROPERTY_PASSWORD = "servicecomb.nacos.username"; + public static final String PROPERTY_PASSWORD = "servicecomb.nacos.password"; public static final String PROPERTY_ACCESS_KEY = "servicecomb.nacos.accessKey"; @@ -57,7 +57,7 @@ public NacosConfig(Environment environment) { } public String getServerAddr() { - return environment.getProperty(PROPERTY_SERVER_ADDR); + return environment.getProperty(PROPERTY_SERVER_ADDR, "http://127.0.0.1:8848"); } public String getDataId() { diff --git a/service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscoveryProperties.java b/service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscoveryProperties.java index 47ae8816da7..6651f1e6345 100644 --- a/service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscoveryProperties.java +++ b/service-registry/registry-nacos/src/main/java/org/apache/servicecomb/registry/nacos/NacosDiscoveryProperties.java @@ -23,7 +23,7 @@ public class NacosDiscoveryProperties { private boolean enabled = true; - private String serverAddr = "127.0.0.1"; + private String serverAddr = "http://127.0.0.1:8848"; private Map metadata = new HashMap<>();