我使用的是jedis版本2.8.0,Spring Data redis版本1.7.5。和redis服务器版本2.8.4用于我们的缓存应用程序。我有多个缓存保存在redis中,get请求是从redis完成的。我正在使用spring data redis API来保存和获取数据。所有的保存和获取都可以正常工作,但偶尔会出现以下异常:
Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.
querying cache : class org.springframework.data.redis.RedisConnectionFailureException Message: Cannot get Jedisconnection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not geta resource from the poolCause: redis.clients.jedis.exception
我目前正在我的maven webapp中使用jedis版本2.9.0。它由一个循环组成,它每五分钟检索一次用于缓存的数据。= jedis.pipelined(); //create the pipeline
pipeline.setex(keylogger.info("Cache synched... ");Could not get a resource from the pool
它发
我试图了解是否有可能创建Java动态代理来自动关闭自动关闭资源,而不必记住将这些资源嵌入到try-resources块中。例如,我有一个JedisPool,它有一个getResource方法,可以这样使用: // use jedisJedisPool pool) { }
public static JedisCommands