You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
opsli-boot/opsli-plugins/opsli-plugins-redisson/README.md

36 lines
1.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## application.properties配置方式(yaml同理)
### redisson分布式锁配置--单机
redisson.lock.server.address=127.0.0.1:6379
redisson.lock.server.type=standalone
redisson.lock.server.password=
redisson.lock.server.database=1
### redisson分布式锁配置--哨兵
**redisson.lock.server.address** 格式为: sentinel.conf配置里的sentinel别名,sentinel1节点的服务IP和端口sentinel2节点的服务IP和端口sentinel3节点的服务IP和端口
<br/>比如sentinel.conf里配置为sentinel monitor my-sentinel-name 127.0.0.1 6379 2,那么这里就配置my-sentinel-name
redisson.server.address=my-sentinel-name,127.0.0.1:26379,127.0.0.1:26389,127.0.0.1:26399
redisson.server.type=sentinel
redisson.lock.server.password=
redisson.lock.server.database=1
### redisson分布式锁配置--集群方式
cluster方式至少6个节点(3主3从3主做sharding3从用来保证主宕机后可以高可用)
<br/>地址格式为: 127.0.0.1:6379,127.0.0.1:6380,127.0.0.1:6381,127.0.0.1:6382,127.0.0.1:6383,127.0.0.1:6384
redisson.server.address=127.0.0.1:6379,127.0.0.1:6380,127.0.0.1:6381,127.0.0.1:6382,127.0.0.1:6383,127.0.0.1:6384
redisson.server.type=cluster
redisson.lock.server.password=
redisson.lock.server.database=1
### redisson分布式锁配置--主从
地址格式为**主节点,子节点,子节点**
<br/>比如:127.0.0.1:6379,127.0.0.1:6380,127.0.0.1:6381
<br/>代表主节点:127.0.0.1:6379从节点127.0.0.1:6380127.0.0.1:6381
redisson.server.address=127.0.0.1:6379,127.0.0.1:6380,127.0.0.1:6381
redisson.server.type=masterslave
redisson.lock.server.password=
redisson.lock.server.database=1