spring集成dubbo实现服务的提供者和消费者

本文详细介绍了如何在Spring中集成Dubbo,包括dubbo-admin的安装使用、Zookeeper在Windows和Linux环境下的安装配置,以及Dubbo的架构、注册中心类型、优缺点和安全机制。此外,还探讨了在注册中心挂掉时服务的通信情况和服务降级的实现。
摘要由CSDN通过智能技术生成

spring和dubbo整合demo下载地址

dubbo源码地址
https://github.com/alibaba/dubbo

dubbo管理工具dubbo-admin安装使用

进入下载dubbo-admin管理界面源码,进行maven打包 把打包war包部署到tomcat
- 打包war包,进入dubbo-admin这个文件目录 运行命令:

mvn package -Dmaven.skip.test=true
  • -

zookeeper 安装 windows环境

在apache的官方网站提供了好多镜像下载地址,然后找到对应的版本
下载地址:
https://mirrors.cnnic.cn/apache/zookeeper/
- 把下载的zookeeper的文件解压到指定目录
- 修改conf下增加一个zoo.cfg,可以用zoo_sample.cfg内内容替代
安装完成进入bin目录启动zkServer.cmd命令

# The number of milliseconds of each tick  心跳间隔 毫秒每次
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
#多少个心跳时间内,允许其他server连接并初始化数据,如果ZooKeeper管理的数据较大,则应相应增大这个值
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
#多少个tickTime内,允许follower同步,如果follower落后太多,则会被丢弃
syncLimit=5
# the directory where the snapshot is stored.
#日志位置
dataDir=F:\\zookeeper-3.3.6\\logs
# the port at which the clients will connect  监听客户端连接的端口
clientPort=2181

w系统下伪集群安装

  • 在 一台机器上通过伪集群运行时可以修改 zkServer.cmd 文件在里面加入
  • set ZOOCFG=..\conf\zoo1.cfg 这行,另存为 zkSer
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值