Open zhangxiongbiao opened 5 years ago
sorry for the late reply.
The RegistryConfig
created by DubboServiceRegistrationAutoConfiguration#defaultSpringCloudRegistryConfig
can be loaded by Dubbo when dubbo services exported.
If no dubbo services exported, the RegistryConfig
created by DubboServiceRegistrationAutoConfiguration#defaultSpringCloudRegistryConfig
won't loaded by Dubbo.
So you just need add spring-cloud registry center to solve this problem like this:
dubbo.registry.address=spring-cloud://localhost
@fangjian0423 thank you for your reply!
我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。 We recommend using English. If you are non-native English speaker, you can use the translation software.
Which Component Dubbo
Describe the bug when my dubbo project export none services,then start it。No registry config found appear.
I find the registry config was set in ServiceBean,get default springCloudRegistry from DubboServiceRegistrationAutoConfiguration. Then set into ConfigManager.
When DubboMetadataService use api manual export in DubboMetadataServiceExporter,it does't cause ServiceBean load registry config,but it can read registry config from ConfigManager when ConfigManager already set registry config after another ServiceBean init.
So when none service export use @Service export service,DubboMetadataService will can't read SpringCloud registry config。
Expected behavior Can we manual load spring cloud registry config in DubboMetadataServiceExporter.