针对Redis实例JedisPool提示JedisPoolConfig报错问题

今天本身想试试Redis缓存,在中间重写Cache中createReids中,MyEclipse工具一直提示报错。提示"The constructor JedisPool(GenericObjectPoolConfig, String) refers to the missing type GenericObjectPoolConfig"

百度了不少,都说什么须要commons-pool.jar这个依赖包。java

然并卵。缓存

最后确认是须要commons-pool2-2.0.jar 这个包。工具

卡着这真的是。spa


JedisPoolConfig poolConfig = new JedisPoolConfig();
JedisPool pool = new JedisPool(poolConfig, "192.168.31.120");