如果在代碼中出現如下錯誤
The constructor JedisPool(GenericObjectPoolConfig, String, int, int, String) refers to the missing type GenericObjectPoolConfig
那麼就是jedis.jar包和commons-pool包不匹配。
最新的jedis2.9.0.jar對應commons-pool2,老的jedis.jar對應common_pool1
可以根據自己的情況到http://commons.apache.org/proper/commons-pool/download_pool.cgi 下載自己對應版本的commons-pool
多試幾次,直到匹配爲止。