从JedisSentinelPool获取jedis

@Bean
public Jedis getjedis() {
JedisSentinelPool redisSentinelPool = null;
redisSentinelPool = new JedisSentinelPool(master, set, redis_password, sentinel_password);
Jedis jedis = null;
try {
jedis = redisSentinelPool.getResource();
return jedis;
} catch (Exception e) {
} finally {
if (jedis != null) {
jedis.close();
}
}
return jedis;
}

从JedisSentinelPool获取jedis最先出现在Python成神之路

版权声明:
作者:zhangchen
链接:https://www.techfm.club/p/25579.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>