简体   繁体   中英

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

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM