久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術(shù)文章
文章詳情頁

java-ee - redis java客戶端不能創(chuàng)建JedisPool

瀏覽:77日期:2023-08-25 08:19:06

問題描述

JedisPoolConfig config = new JedisPoolConfig(); config.setMaxActive(100);config.setMaxIdle(20);config.setMaxWait(1000l);config.setTestOnBorrow(true);JedisPool jedisPool= new JedisPool(config, 'localhost');

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$Configjedis.jar的版本是2.1.0

問題解答

回答1:

沒錯,commons-pool這個依賴包必須添加上,否則代碼是對的也報錯

回答2:

原來是忘記添加GenericObjectPool的基本包commons-pool

回答3:

更新redis client;低版本的redis clien在Jave8編譯有八阿哥。

標簽: java
相關(guān)文章:
主站蜘蛛池模板: 防城港市| 多伦县| 呼图壁县| 新和县| 疏附县| 体育| 肥西县| 东安县| 石阡县| 图片| 白朗县| 临夏县| 龙陵县| 高要市| 道孚县| 永川市| 洞口县| 杨浦区| 互助| 神农架林区| 金塔县| 合山市| 汪清县| 九寨沟县| 广东省| 墨江| 邵阳县| 汶川县| 丹东市| 济源市| 晋中市| 阿拉善左旗| 襄垣县| 嘉定区| 湘潭县| 腾冲县| 雷州市| 佛冈县| 通榆县| 屏南县| 崇义县|