国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

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

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

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

問(wèn)題描述

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總是報(bào)錯(cuò),鼠標(biāo)移到小紅叉上提示:

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

問(wèn)題解答

回答1:

沒(méi)錯(cuò),commons-pool這個(gè)依賴包必須添加上,否則代碼是對(duì)的也報(bào)錯(cuò)

回答2:

原來(lái)是忘記添加GenericObjectPool的基本包c(diǎn)ommons-pool

回答3:

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

標(biāo)簽: java
相關(guān)文章:
主站蜘蛛池模板: 修水县| 崇义县| 津市市| 陕西省| 交城县| 凯里市| 乌海市| 鞍山市| 丽江市| 武乡县| 牙克石市| 沂南县| 大田县| 子长县| 河间市| 扬州市| 邵阳县| 资阳市| 阳东县| 焦作市| 大丰市| 皮山县| 宿松县| 沽源县| 丰城市| 苍梧县| 兴海县| 名山县| 封开县| 兴国县| 定襄县| 中山市| 阳曲县| 修水县| 理塘县| 启东市| 城步| 伊川县| 搜索| 广宗县| 辽阳市|