Skip to content

Duplicate RegistryConfig found, there already has one default RegistryConfig or more than two RegistryConfigs have the same id  #736

@iwhalecloud-platform

Description

@iwhalecloud-platform

属性配置:

dubbo.registries.registryB.address=zookeeper://127.0.0.1:2181
dubbo.registries.registryB.group=dubbo

dubbo.registries.registryA.address=zookeeper://127.0.0.1:2181
dubbo.registries.registryA.group=dubboA

如果使用dubbo.scan-base-packages,就会提示警告Duplicate RegistryConfig found, there already has one default RegistryConfig or more than two RegistryConfigs have the same id ,这样会导致以下问题:
@service只会注册到一个注册中心,除非使用@DubboComponenctScan就可以解决。
而且在使用dubbo.scan-base-packages时,下面的配置,id必须跟dubbo.registries.后面的值一样,否则@reference(registry="registryBCC")就会出问题,

dubbo.registries.registryB.id=registryBCC
dubbo.registries.registryB.address=zookeeper://127.0.0.1:2181
dubbo.registries.registryB.group=dubbo

dubbo.registries.registryA.id=registryBDD
dubbo.registries.registryA.address=zookeeper://127.0.0.1:2181
dubbo.registries.registryA.group=dubboA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions