Use Connection pool with Jedis

前端 未结 2 777
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-06 08:37

I am using Jedis to connect with a Redis server in a REST service.

When I am calling the web service I want to do operations like jedis.hmget ,

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 09:19

    Check out Spring-data-redis.

    When you add a JedisConnectionFactory you get a connectionFactory which has connection pooling capability by default.

    JedisConnectionFactory() Constructs a new JedisConnectionFactory instance with default settings (default connection pooling, no shard information). See docs.

    
    
        
    
    
    

    For further information, see the documentation.

提交回复
热议问题