单机redis
spring redis: host: 192.168.2.94 port: 6379 password: 123456
分片集群(cluster)
spring redis: password: 123456 # 密码(默认为空) cluster: nodes: 192.168.2.64:6370,192.168.2.64:6371,192.168.2.64:6372,192.168.2.24:6373,192.168.2.24:6374,192.168.2.24:6375,192.168.2.34:6376,192.168.2.34:6377,192.168.2.34:6378
哨兵集群(sentinel)
spring: redis: password: 123456 # 密码(默认为空) sentinel: master: mymaster #哨兵监控的名称,创建时自己定义 nodes: 192.168.2.24:26373,192.168.2.24:26374,192.168.2.24:26375 #哨兵的ip:port,不是redis服务的!