You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ConfigCenterConfig's member field's key wrong #3682
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.7.1-SNAPSHOT
Operating System version: MacOS 10.14
Java version: 1.8
I find some member fields of ConfigCenterConfig are annotated by @parameter, and the 'useKeyAsProperty' property of the annotation is set 'false'.
For example, the 'check' member field is annotated by @parameter, and its key is "config.check", but the 'useKeyAsProperty' is false.
So the key of this field in URL's parameters is 'check' because the 'useKeyAsProperty' is false, but in config center configuration class like ApolloDynamicConfiguration, the class use 'config.check' to get the property from parameters of URL.
So I think we should adjust the setting.
How about set the 'useKeyAsProperty' to true ?
I want to listen others' proposals.
Steps to reproduce this issue
config
<dubbo:configcenter address:xxx check="false"/>
Expected Result
the key in url's parameters should be "config.check", because in apollo dynamic configuration class, it use the key to get the check property
What do you expected from the above steps?
Actual Result
the key in parameters is check
If there is an exception, please attach the exception trace:
So the key of this field in URL's parameters is 'check' because the 'useKeyAsProperty' is false, but in config center configuration class like ApolloDynamicConfiguration, the class use 'config.check' to get the property from parameters of URL.
I don't think the problem you described exists.
To clarify the relations between check and useKeyAsProperty and also to avoid misunderstanding, I add some comments on @parameter, please help to check.
Activity
[-]ConfigCenterConfig's check key wrong[/-][+]ConfigCenterConfig's member field's key wrong[/+]chickenlj commentedon Apr 11, 2019
I don't think the problem you described exists.
To clarify the relations between
checkanduseKeyAsPropertyand also to avoid misunderstanding, I add some comments on @parameter, please help to check.slankka commentedon Jul 23, 2019
I noticed the properties of ConfigCenterConfig is not read correctly by
org.apache.dubbo.configcenter.support.apollo.ApolloDynamicConfigurationDubbo Version 2.7.1
The namespace is changed to consumer, but the program still access the default namespace:dubbo
The code in
ApolloDynamicConfiguration:And it always be "dubbo", due to the url field
parametershas noconfig.namespacebutnamespace:The namespace is set by
config.namespace, then it works fine.slankka commentedon Jul 23, 2019
#4411 The problem has been solved. Please ignore.