The type org.apache.commons.pool.impl.GenericObjectPool$Config cannot be resolved. It is indirectly

static {
        try {
            JedisPoolConfig config = new JedisPoolConfig();
            config.setMaxActive(MAX_ACTIVE);
            config.setMaxIdle(MAX_IDLE);
            config.setMaxWait(MAX_WAIT);
            config.setTestOnBorrow(TEST_ON_BORROW);
            jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, AUTH);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

config.setMaxWait(MAX_WAIT);

jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, AUTH);

这俩行报错:The type org.apache.commons.pool.impl.GenericObjectPool$Config cannot be resolved. It is indirectly ...

加上commons-pool.jar 即可

 

posted @ 2016-07-07 17:57  薛晓东  阅读(402)  评论(0编辑  收藏  举报