【问题标题】:How to enable TLS in jedis while connecting with Redis cluster连接 Redis 集群时如何在 jedis 中启用 TLS
【发布时间】: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


    【解决方案1】:

    可能实际上需要一个小版本的 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' />
    

    【讨论】:

      猜你喜欢
      • 2015-10-13
      • 2017-12-27
      • 1970-01-01
      • 2020-07-24
      • 2016-12-10
      • 2017-06-17
      • 2020-01-03
      • 2019-08-03
      • 2020-08-23
      相关资源
      最近更新 更多