从 Dubbo3 开始,etcd 注册中心适配已经不再内嵌在 Dubbo 中,使用前需要单独引入独立的模块。
<dependency>
<groupId>org.apache.dubbo.extensions</groupId>
<artifactId>dubbo-registry-etcd</artifactId>
<version>3.3.0</version>
</dependency>
<dubbo:registry address="etcd://10.20.153.10:6379" />
或
<dubbo:registry address="etcd://10.20.153.10:6379?backup=10.20.153.11:6379,10.20.153.12:6379" />
或
<dubbo:registry protocol="etcd" address="10.20.153.10:6379" />
或
<dubbo:registry protocol="etcd" address="10.20.153.10:6379,10.20.153.11:6379,10.20.153.12:6379" />