新加不带timeout跟password的构造方法,满足8/2需求。

建议生产环境都使用带poolConfig的构造方法,防止redis出现链接异常,可参考 bug
https://github.com/xetorthio/jedis/issues/848
This commit is contained in:
bobbyguo 2017-04-28 11:38:49 +08:00
parent a1faf8d2a2
commit 091e47897d

View File

@ -39,6 +39,11 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
this.jedisPool = new JedisPool(host, port);
}
public WxCpJedisConfigStorage(JedisPoolConfig poolConfig, String host, int port) {
this.jedisPool = new JedisPool(poolConfig, host, port);
}
public WxCpJedisConfigStorage(JedisPoolConfig poolConfig, String host, int port, int timeout, final String password) {
this.jedisPool = new JedisPool(poolConfig, host, port, timeout, password);
}