From 2c5a4f608cfb44415a3bd38d9d164ed51fb04873 Mon Sep 17 00:00:00 2001 From: Joe Zou <yixian.zou@gmail.com> Date: Thu, 16 Jan 2020 22:21:35 +0800 Subject: [PATCH] fix zookeeper config center namespace default value invalid --- config/config_center_config.go | 2 +- config_center/apollo/impl.go | 2 +- config_center/apollo/impl_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config_center_config.go b/config/config_center_config.go index 013d23946..aee9ae8c1 100644 --- a/config/config_center_config.go +++ b/config/config_center_config.go @@ -40,7 +40,7 @@ type ConfigCenterConfig struct { Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` ConfigFile string `default:"dubbo.properties" yaml:"config_file" json:"config_file,omitempty"` - Namespace string `default:"dubbo.properties" yaml:"namespace" json:"namespace,omitempty"` + Namespace string `default:"dubbo" yaml:"namespace" json:"namespace,omitempty"` AppConfigFile string `default:"dubbo.properties" yaml:"app_config_file" json:"app_config_file,omitempty"` AppId string `default:"dubbo" yaml:"app_id" json:"app_id,omitempty"` TimeoutStr string `yaml:"timeout" json:"timeout,omitempty"` diff --git a/config_center/apollo/impl.go b/config_center/apollo/impl.go index ed46d4f96..f72f988e6 100644 --- a/config_center/apollo/impl.go +++ b/config_center/apollo/impl.go @@ -58,7 +58,7 @@ func newApolloConfiguration(url *common.URL) (*apolloConfiguration, error) { configCluster := url.GetParam(constant.CONFIG_CLUSTER_KEY, "") appId := url.GetParam(constant.CONFIG_APP_ID_KEY, "") - namespaces := url.GetParam(constant.CONFIG_NAMESPACE_KEY, getProperties(DEFAULT_GROUP)) + namespaces := getProperties(url.GetParam(constant.CONFIG_NAMESPACE_KEY, DEFAULT_GROUP)) c.appConf = &agollo.AppConfig{ AppId: appId, Cluster: configCluster, diff --git a/config_center/apollo/impl_test.go b/config_center/apollo/impl_test.go index 2a891a212..84e2b28ba 100644 --- a/config_center/apollo/impl_test.go +++ b/config_center/apollo/impl_test.go @@ -192,7 +192,7 @@ func initMockApollo(t *testing.T) *apolloConfiguration { Address: "106.12.25.204:8080", AppId: "testApplication_yang", Cluster: "dev", - Namespace: "mockDubbog.properties", + Namespace: "mockDubbog", }} apollo := initApollo() apolloUrl := strings.ReplaceAll(apollo.URL, "http", "apollo") -- GitLab