Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Setting the default IDs for Dubbo's Config Beans #5721

Closed
mercyblitz opened this issue Feb 7, 2020 · 2 comments
Closed

[Enhancement] Setting the default IDs for Dubbo's Config Beans #5721

mercyblitz opened this issue Feb 7, 2020 · 2 comments
Assignees
Milestone

Comments

@mercyblitz
Copy link
Contributor

The IDs of Dubbo's Config instances are very important metadata that will be cached into ConfigManager as the cache key, thus In Spring scenario, The bean names are identified and could be used as the value Of Ids.

@mercyblitz mercyblitz added this to the 2.7.6 milestone Feb 7, 2020
@mercyblitz mercyblitz self-assigned this Feb 7, 2020
mercyblitz added a commit to mercyblitz/dubbo that referenced this issue Feb 10, 2020
mercyblitz added a commit that referenced this issue Feb 11, 2020
…igBindings (#5730)

* Polish /#5721 : [Enhancement] Setting the default IDs for Dubbo's Config Beans

* Polish /#5729 : [Optimization] To remove EnableDubboConfigBinding and EnableDubboConfigBindings
mercyblitz added a commit that referenced this issue Feb 17, 2020
* Polish /#4687 : Remove the duplicated test code in dubbo-config-spring

* Polish /#4674 & /#4470

* Polish /#5093 : Revert the previous commit

* Polish #5093 : [Feature] Dubbo Services generate the metadata of REST services

* Polish #5306 : [Migration] Upgrade the @SInCE tags in Javadoc migration cloud native to master

* Polish #5306 : [Migration] Upgrade the @SInCE tags in Javadoc migration cloud native to master

* Polish #5309 : [ISSURE] The beans of Dubbo's Config can't be found on the ReferenceBean's initialization

* Polish #5312 : Resolve the demos' issues of zookeeper and nacos

* Polish #5313 : [Migration] migrate the code in common module from cloud-native branch to master

* Polish #5316 : [Refactor] Replace @EnableDubboConfigBinding Using spring-context-support

* Polish #5317 : [Refactor] Refactor ReferenceAnnotationBeanPostProcessor using Alibaba spring-context-suuport API

* Polish #5321 : Remove BeanFactoryUtils

* Polish #5321 : Remove AnnotatedBeanDefinitionRegistryUtils

* Polish #5321 : Remove AnnotationUtils

* Polish #5321 : Remove ClassUtils

* Polish #5321 : Remove BeanRegistrar

* Polish #5321 : Remove ObjectUtils

* Polish #5321 : Remove PropertySourcesUtils

* Polish #5325 : [Migration] To migrate dubbo-metadata-api from cloud-native branch

* Polish #5326 : [Migration] To migrate dubbo-metadata-processor from cloud-native branch

* Polish #5329 : [Feature] To add the default metadata into ServiceInstance

* Polish #5339 : [Refactor] Refactor the DynamicConfiguration interface

* Polish bugfix

* Fixes test cases

* Merge remote-tracking branch 'upstream/master' into cloud-native-2.7.5

# Conflicts:
#	dubbo-configcenter/dubbo-configcenter-zookeeper/src/test/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfigurationTest.java
#	dubbo-metadata/dubbo-metadata-api/src/test/java/org/apache/dubbo/metadata/DynamicConfigurationServiceNameMappingTest.java

* Merge remote-tracking branch 'upstream/master' into cloud-native-2.7.5

# Conflicts:
#	dubbo-configcenter/dubbo-configcenter-zookeeper/src/test/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfigurationTest.java
#	dubbo-metadata/dubbo-metadata-api/src/test/java/org/apache/dubbo/metadata/DynamicConfigurationServiceNameMappingTest.java

* Polish /#5721 : [Enhancement] Setting the default IDs for Dubbo's Config Beans

* Polish /#5729 : [Optimization] To remove EnableDubboConfigBinding and EnableDubboConfigBindings

* Polish /#5594 : [Feature] Add the resolver of ServiceRestMetadata based on Java Reflection

* Polish /#5736 : [Feature] Introducing Conversion features

* Polish /#5737 : [Feature] Introducing "dubbo-metadata-processor" module

* Polish /#5594 : Change the Metadata implementation

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases

* Polish /#5594 : Fixed test cases
@iamorchid
Copy link

iamorchid commented Jun 21, 2020

这里的change导致了另外一个问题,config bean的id会作为property key的一部分,会导致出现这样的property key: dubbo.registry.org.apache.dubbo.config.RegistryConfig#0.address,其中org.apache.dubbo.config.RegistryConfig#0是bean的id。这将导致其他配置中key为dubbo.registry.address的配置失效。config prefix + id作为property key的前缀,这个是否有必要呢?多数情况下,用户更关心的是config prefix.

我们在使用DubboConfigConfiguration.Single的情况下,是否可以避免设置上述bean id?

@Devifish
Copy link

Devifish commented Jul 1, 2020

该修改导致在添加了EnableDubboDubboComponentScan等注解的情况下 ApplicationConfig配置的 name 参数注入并覆盖了配置文件的参数为 org.apache.dubbo.config.ApplicationConfig#0引发ApplicationConfig.name 名称不符合规则异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants