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:
蘑菇0202 2017-04-28 11:13:49 +08:00 committed by Binary Wang
parent cf5c21d9f1
commit a1faf8d2a2

View File

@ -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
*/