猿问

jedis报错了,麻烦看看为什么错了啊

clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool


public static void demo1() {
   Jedis jedis = null;
   JedisPoolConfig config = new JedisPoolConfig();
   config.setMaxTotal(30);
   config.setMaxIdle(10);
   JedisPool pool = new JedisPool(config, "192.168.211.128", 6379);
   jedis = pool.getResource();
   jedis.set("1", "po");
   String s = jedis.get("1");
   System.out.println(s);
   jedis.close();
}

public static void main(String[] args) {
   demo1();
}

fenkapian
浏览 1195回答 1
1回答
随时随地看视频慕课网APP

相关分类

Java
我要回答