diff --git a/common/constant/key.go b/common/constant/key.go index 0c0c91f39e3134eeebe83524850e10f24f5bb1fb..a52f15875a31a99f4d6a305454fce92aa3f29cdc 100644 --- a/common/constant/key.go +++ b/common/constant/key.go @@ -101,6 +101,7 @@ const ( const ( CONFIG_NAMESPACE_KEY = "config.namespace" CONFIG_GROUP_KEY = "config.group" + CONFIG_APP_ID_KEY = "config.appId" CONFIG_CLUSTER_KEY = "config.cluster" CONFIG_CHECK_KEY = "config.check" CONFIG_TIMEOUT_KET = "config.timeout" diff --git a/config/config_center_config.go b/config/config_center_config.go index 9c100b34974af604a9613eb8e1559360c36b7a6b..b10d658ecf37b308be1a2a81767fa3808c8e8668 100644 --- a/config/config_center_config.go +++ b/config/config_center_config.go @@ -42,6 +42,7 @@ type ConfigCenterConfig struct { ConfigFile string `default:"dubbo.properties" yaml:"config_file" json:"config_file,omitempty"` Namespace string `default:"dubbo.properties" 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"` timeout time.Duration } diff --git a/config_center/apollo/impl.go b/config_center/apollo/impl.go index 4eff318e54c795428732c3e045c7a77321d3e777..ffe959e821ad49fa919c4e080bc84681d076ee5a 100644 --- a/config_center/apollo/impl.go +++ b/config_center/apollo/impl.go @@ -57,7 +57,7 @@ func newApolloConfiguration(url *common.URL) (*apolloConfiguration, error) { configAddr := c.getAddressWithProtocolPrefix(url) configCluster := url.GetParam(constant.CONFIG_CLUSTER_KEY, "") - appId := url.GetParam(constant.CONFIG_GROUP_KEY, DEFAULT_GROUP) + appId := url.GetParam(constant.CONFIG_APP_ID_KEY, "") namespaces := url.GetParam(constant.CONFIG_NAMESPACE_KEY, getProperties(DEFAULT_GROUP)) c.appConf = &agollo.AppConfig{ AppId: appId,