Dubbo2.7使用Zookeeper注册中心
source link: https://laboo.top/2019/11/26/dbzk/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Dubbo2.7使用Zookeeper注册中心
Posted on
2019-11-26 Edited on 2021-12-15 In 环境部署
dubbo
官方文档中关于集成zookeeper
的说明在2.7.1
版本下缺少了必要的步骤, 做此记录
Dubbo
2.7.1Zookpper
3.5.5Springboot
2.1.1.RELEASE
Maven
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.5.5</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
# 服务端
dubbo:
application:
name: ${spring.application.name}
scan:
base-packages: test.dubbo
registry:
address: zookeeper://localhost:2181
protocol:
name: dubbo
port: 9999
# 客户端
dubbo:
application:
name: ${spring.application.name}
registry:
address: zookeeper://localhost:2181
protocol:
name: dubbo
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK