Просмотр исходного кода

update WxCpJedisConfigStorage, connect a redis with password and pool config (#202)

Change-Id: I3f5de67f148e599a1040239f71c9697e956c6873
Signed-off-by: zhangxintao <zhang.xintao@trans-cosmos.com.cn>
master
蘑菇0202 8 лет назад
committed by Binary Wang
Родитель
Сommit
a1faf8d2a2
1 измененных файлов: 5 добавлений и 0 удалений
  1. +5
    -0
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpJedisConfigStorage.java

+ 5
- 0
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpJedisConfigStorage.java Просмотреть файл

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


Загрузка…
Отмена
Сохранить