目录
7.2 遇到的问题(已经设置了bind和protected-mode)... 35
10.2.5 AOP同步频率设置—在配置文件里.... 49
14.1 ACL—Access Control List 73
类似jsp中的include,多实例的情况可以把公用的配置文件提取出来
7.2 遇到的问题(已经设置了bind和protected-mode)
@EnableCaching |
include /home/bigdata/redis.conf port 6379 pidfile "/var/run/redis_6379.pid" dbfilename "dump6379.rdb" dir "/home/bigdata/redis_cluster" logfile "/home/bigdata/redis_cluster/redis_err_6379.log" cluster-enabled yes cluster-config-file nodes-6379.conf cluster-node-timeout 15000 |
public class JedisClusterTest { public static void main(String[] args) { Set<HostAndPort>set =new HashSet<HostAndPort>(); set.add(new HostAndPort("192.168.31.211",6379)); 放哪个都可以,集群会自动切换 JedisCluster jedisCluster=new JedisCluster(set); jedisCluster.set("k1", "v1"); System.out.println(jedisCluster.get("k1")); } } |
设置过期时间可以解决锁一直不释放的问题
@GetMapping("testLock") |