diff --git a/common/constant/key.go b/common/constant/key.go index 5be63fe82ce61d41b0845e2e076e48c3aebcd0cb..8da0e89caf7b5a184bdd98293f04557afe173ecf 100644 --- a/common/constant/key.go +++ b/common/constant/key.go @@ -150,6 +150,7 @@ const ( NACOS_CATEGORY_KEY = "category" NACOS_PROTOCOL_KEY = "protocol" NACOS_PATH_KEY = "path" + NACOS_NAMESPACE_ID = "namespaceId" ) const ( diff --git a/registry/nacos/base_registry.go b/registry/nacos/base_registry.go index 63f4999675470853d0f48d1a22b709efdc1c9d26..f09754ebfb069da892881ea0d1754dfb11746675 100644 --- a/registry/nacos/base_registry.go +++ b/registry/nacos/base_registry.go @@ -95,6 +95,7 @@ func getNacosConfig(url *common.URL) (map[string]interface{}, error) { clientConfig.CacheDir = url.GetParam(constant.NACOS_CACHE_DIR_KEY, "") clientConfig.LogDir = url.GetParam(constant.NACOS_LOG_DIR_KEY, "") clientConfig.Endpoint = url.GetParam(constant.NACOS_ENDPOINT, "") + clientConfig.NamespaceId = url.GetParam(constant.NACOS_NAMESPACE_ID, "") clientConfig.NotLoadCacheAtStart = true configMap["clientConfig"] = clientConfig