From a7c793ecf6791cc1590453aaff6e9700f03fbc24 Mon Sep 17 00:00:00 2001 From: Vycz Date: Sun, 4 Jun 2023 23:01:19 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=85=BC=E5=AE=B9SpringBoot3=E4=B8=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84Jedis4=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxjava/mp/config/WxMpStorageAutoConfiguration.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.java b/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.java index cf3c48656..912b90262 100644 --- a/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.java +++ b/spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.java @@ -14,16 +14,16 @@ import me.chanjar.weixin.mp.config.WxMpConfigStorage; import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; import me.chanjar.weixin.mp.config.impl.WxMpRedisConfigImpl; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.core.StringRedisTemplate; +import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; -import redis.clients.jedis.JedisPoolAbstract; import redis.clients.jedis.JedisPoolConfig; import redis.clients.jedis.JedisSentinelPool; +import redis.clients.jedis.util.Pool; import java.util.Set; @@ -74,7 +74,7 @@ public class WxMpStorageAutoConfiguration { } private WxMpConfigStorage jedisConfigStorage() { - JedisPoolAbstract jedisPool; + Pool jedisPool; if (wxMpProperties.getConfigStorage() != null && wxMpProperties.getConfigStorage().getRedis() != null && StringUtils.isNotEmpty(wxMpProperties.getConfigStorage().getRedis().getHost())) { jedisPool = getJedisPool(); @@ -131,7 +131,7 @@ public class WxMpStorageAutoConfiguration { } } - private JedisPoolAbstract getJedisPool() { + private Pool getJedisPool() { RedisProperties redis = wxMpProperties.getConfigStorage().getRedis(); JedisPoolConfig config = new JedisPoolConfig();