1、修改redis配置:
- “${ESB Governor安装目录}\config\application.properties”文件
- ”${API GATEWAY安装目录}\config\application.properties”文件
# Cluster模式redis集群配置
spring.redis.cluster.nodes=172.34.10.106:8379,172.34.10.182:8379,172.34.10.185:8379 #主备都需要写
spring.redis.password=+s3s7WaK0lyKMhIvQB4N8w==
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
# spring.redis.lettuce.pool.min-idle=50
spring.redis.lettuce.pool.max-wait=5000
# 主从模式集群配置
spring.redis.host=10.71.34.30
spring.redis.port=6379
spring.redis.password=BGRPwX7rhVSPkGCwt9nd8A=
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
spring.redis.sentinel.master=master
spring.redis.cluster.nodes=10.71.34.30:6379,10.71.34.31:6379,10.71.34.32:6379
spring.redis.lettuce.cluster.refresh.adaptive=true
spring.redis.lettuce.cluster.refresh.period=10000
# 哨兵模式redis集群配置
# Redis Sentinel Master 名称
spring.redis.sentinel.master=esbmaster
# Sentinel 节点地址
spring.redis.sentinel.nodes=10.53.141.12:26379,10.53.141.13:26379,10.53.141.18:26379
# Redis 主节点密码
spring.redis.password=3x0W95rImobwtoD6E2cfSQ==
# 连接池配置
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
# Sentinel 密码(如果有的话)
spring.redis.sentinel.password=3x0W95rImobwtoD6E2cfSQ==
2、启动ESB Governor、API Gateway服务