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

妖精的绣舞 提交于 2019-12-11 05:28:52

问题


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

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

If it doesn't support,how should I do?


回答1:


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')


来源:https://stackoverflow.com/questions/25131166/does-spring-data-redis-1-3-2-release-support-jedissentinelpool-of-jedis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!