mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
update WxCpJedisConfigStorage, connect a redis with password and pool config (#202)
Change-Id: I3f5de67f148e599a1040239f71c9697e956c6873 Signed-off-by: zhangxintao <zhang.xintao@trans-cosmos.com.cn>
This commit is contained in:
parent
cf5c21d9f1
commit
a1faf8d2a2
@ -4,6 +4,7 @@ import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.JedisPoolConfig;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -38,6 +39,10 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
|
||||
this.jedisPool = new JedisPool(host, port);
|
||||
}
|
||||
|
||||
public WxCpJedisConfigStorage(JedisPoolConfig poolConfig, String host, int port, int timeout, final String password) {
|
||||
this.jedisPool = new JedisPool(poolConfig, host, port, timeout, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be destroy jedis pool
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user