Skip to content

Commit

Permalink
redis password null
Browse files Browse the repository at this point in the history
  • Loading branch information
Edinjohn committed May 10, 2019
1 parent 55f76bf commit b010212
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/wang/config/redis/JedisConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.wang.config.redis;

import com.wang.util.common.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand Down Expand Up @@ -57,7 +58,8 @@ public JedisPool redisPoolFactory() {
jedisPoolConfig.setMaxTotal(maxActive);
jedisPoolConfig.setMinIdle(minIdle);
// JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, password);
JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, null);
String pwd = StringUtil.isBlank(password) ? null : password;
JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, pwd);
LOGGER.info("初始化Redis连接池JedisPool成功!地址: " + host + ":" + port);
return jedisPool;
} catch (Exception e) {
Expand Down

0 comments on commit b010212

Please sign in to comment.