今天自己想试试Redis缓存,在中间重写Cache中createReids中,MyEclipse工具一直提示报错。提示"The constructor JedisPool(GenericObjectPoolConfig, String) refers to the missing type GenericObjectPoolConfig"
百度了很多,都说什么需要commons-pool.jar这个依赖包。
然并卵。
最后确认是需要commons-pool2-2.0.jar 这个包。
卡着这真的是。
JedisPoolConfig poolConfig = new JedisPoolConfig();
JedisPool pool = new JedisPool(poolConfig, "192.168.31.120");