Spring Data Redis (1.3.2.RELEASE) 是否支持jedis的JedisSentinelPool? [英] Does Spring Data Redis (1.3.2.RELEASE) support JedisSentinelPool of jedis?

查看:52
本文介绍了Spring Data Redis (1.3.2.RELEASE) 是否支持jedis的JedisSentinelPool?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Spring Data Redis (1.3.2.RELEASE) 是否支持jedis的JedisSentinelPool?

Does Spring Data Redis (1.3.2.RELEASE) support JedisSentinelPool of jedis?

可能不支持,谁能给我答案?

Maybe it doesn't support,who will give me an answer?

如果不支持怎么办?

推荐答案

Spring Data Redis 1.4 添加了对 Redis Sentinel 的支持.它将在即将发布的 Evans RC1 中,允许配置 JedisConnectionFactory 以使用 JedisSentinelPool.

Support for Redis Sentinel is added to Spring Data Redis 1.4. It will be in the upcoming Evans RC1, allowing configuration of JedisConnectionFactory to make use of JedisSentinelPool.

RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration()
  .master("mymaster")
  .sentinel("127.0.0.1", 26379)
  .sentinel("127.0.0.1", 26380);

JedisConnectionFactory factory = new JedisConnectionFactory(sentinelConfig);
factory.afterPropertiesSet();

您已经可以查看当前的快照构建:

You can already have a look at the current snapshot build:

compile(group: 'org.springframework.data', name: 'spring-data-redis', version: '1.4.0.BUILD-SNAPSHOT')

这篇关于Spring Data Redis (1.3.2.RELEASE) 是否支持jedis的JedisSentinelPool?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆