【发布时间】:2018-12-04 21:38:13
【问题描述】:
我们在应用程序中使用 Redis 进行缓存,该应用程序在 spring bean、spring-data-redis 1.7.1、jedis 2.9.0 中配置。
jedis连接Redis集群时如何开启TLS?
如果您有任何建议,请发表评论
【问题讨论】:
标签: redis jedis spring-data-redis redis-cluster
我们在应用程序中使用 Redis 进行缓存,该应用程序在 spring bean、spring-data-redis 1.7.1、jedis 2.9.0 中配置。
jedis连接Redis集群时如何开启TLS?
如果您有任何建议,请发表评论
【问题讨论】:
标签: redis jedis spring-data-redis redis-cluster
您可能实际上需要一个小版本的 spring-data-redis,但使用 spring-data-redis 1.8.11 和 jedis 2.9 可以:
<beans:bean id='cacheManager'
class='org.springframework.data.redis.cache.RedisCacheManager'
c:redis-operations-ref='redisTemplate'/>
<beans:bean id='redisTemplate' class='org.springframework.data.redis.core.RedisTemplate' p:connection-factory-ref='jedisConFac' />
<beans:bean id='jedisConFac' class='org.springframework.data.redis.connection.jedis.JedisConnectionFactory' p:host-name='HOST' p:port='PORT' p:use-ssl='true' />
【讨论】: