开发者社区> 问答> 正文

redis java客户端不能创建JedisPool请指教。

1
JedisPool jedisPool= new JedisPool(config, "localhost");
这句Eclipse总是报错,鼠标移到小红叉上提示:
全选复制放进笔记Multiple markers at this line

- The type org.apache.commons.pool.impl.GenericObjectPool$Config cannot be resolved. It is indirectly referenced from 
 required .class files
- The constructor JedisPool(GenericObjectPool$Config, String) refers to the missing type GenericObjectPool$Config

jedis.jar的版本是2.1.0

展开
收起
落地花开啦 2016-02-27 17:49:41 2496 0
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    忘记添加GenericObjectPool的基本包commons-pool,commons-pool这个依赖包必须添加上,否则代码是对的也报错。

    2019-07-17 18:49:07
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
ApsaraDB for Redis——与创客同行 立即下载
微博的Redis定制之路 立即下载
云数据库Redis版的开源之路 立即下载