Skip to content

Commit a1faf8d

Browse files
mog0202binarywang
authored andcommitted
update WxCpJedisConfigStorage, connect a redis with password and pool config (binarywang#202)
Change-Id: I3f5de67f148e599a1040239f71c9697e956c6873 Signed-off-by: zhangxintao <zhang.xintao@trans-cosmos.com.cn>
1 parent cf5c21d commit a1faf8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpJedisConfigStorage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
55
import redis.clients.jedis.Jedis;
66
import redis.clients.jedis.JedisPool;
7+
import redis.clients.jedis.JedisPoolConfig;
78

89
import java.io.File;
910

@@ -38,6 +39,10 @@ public WxCpJedisConfigStorage(String host, int port) {
3839
this.jedisPool = new JedisPool(host, port);
3940
}
4041

42+
public WxCpJedisConfigStorage(JedisPoolConfig poolConfig, String host, int port, int timeout, final String password) {
43+
this.jedisPool = new JedisPool(poolConfig, host, port, timeout, password);
44+
}
45+
4146
/**
4247
* This method will be destroy jedis pool
4348
*/

0 commit comments

Comments
 (0)