共計(jì) 1427 個(gè)字符,預(yù)計(jì)需要花費(fèi) 4 分鐘才能閱讀完成。
行業(yè)資訊
服務(wù)器
云計(jì)算
iBash4J 部署時(shí)啟動(dòng)項(xiàng)目連接不上 Redis 無(wú)法從 JedisPool 中獲取連接該怎么辦
本篇文章為大家展示了 iBash4J 部署時(shí)啟動(dòng)項(xiàng)目連接不上 Redis 無(wú)法從 JedisPool 中獲取連接該怎么辦,內(nèi)容簡(jiǎn)明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過(guò)這篇文章的詳細(xì)介紹希望你能有所收獲。
以下是配置文件
redis.host=192.168.158.128redis.port=6379redis.password=#最小空閑數(shù) redis.minIdle=2#最大空閑數(shù) redis.maxIdle=10#最大連接數(shù) redis.maxTotal=100# 最大建立連接等待時(shí)間
redis.maxWaitMillis=8000#客戶端超時(shí)時(shí)間單位是毫秒 redis.timeout=120000# 明是否在從池中取出連接前進(jìn)行檢驗(yàn), 如果檢驗(yàn)失敗, 則從池中去除連接并嘗試取出另一個(gè) redis.testOnBorrow=trueredis.expiration=600#redisclusterspring.redis.cluster.nodes=192.168.158.128:7001,192.168.158.128:7002,192.168.158.128:7003,192.168.158.128:7004,192.168.158.128:7005,192.168.158.128:7006spring.redis.cluster.max-redirects=3#rediscluster
?xml version= 1.0 encoding= UTF-8 ? beans xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance xmlns= http://www.springframework.org/schema/beans xmlns:p= http://www.springframework.org/schema/p xmlns:c= http://www.springframework.org/schema/c xmlns:context= http://www.springframework.org/schema/context xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
!-- jedis 配置 --
bean id= jedisPoolConfig "服務(wù)器" target="_blank" > 服務(wù)器中心 --
bean id= jedisConnectionFactory >上述內(nèi)容就是 iBash4J 部署時(shí)啟動(dòng)項(xiàng)目連接不上 Redis 無(wú)法從 JedisPool 中獲取連接該怎么辦,你們學(xué)到知識(shí)或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識(shí)儲(chǔ)備,歡迎關(guān)注丸趣 TV 行業(yè)資訊頻道。
正文完
2023-08-16