在安装在red hat linux中的redis服务器上尝试基本设置操作。JedisPool pool = new JedisPool(new JedisPoolConfig(), HOST, PORT);
jedis = pool.getResource();
System.out.println(jedis.isConnected()); //prints
我有一个Redis集群,有一个主机(ip: 192.168.56.101)和两个从(ip: 192.168.56.102,192.168.56.103),我使用jedis连接主机读写数据。JedisPool pool = new JedisPool(new JedisPoolConfig(), "192.168.56.101");
有一天,我的主节点死了,所以jedis无法连接到集群
//Connecting to Redis server on localhost System.out.println());
但是当我在插件中使用Jedis时,我得到了Caused by: java.lang.NoClassDefFoundError: redis/clients/jedis/Jedis和Causedby: j