|
@@ -1,6 +1,8 @@
|
|
|
package com.zhongshu.reward.server.core.util.ext;
|
|
|
|
|
|
import lombok.Data;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
@@ -13,6 +15,7 @@ import redis.clients.jedis.JedisPoolConfig;
|
|
|
*/
|
|
|
@Data
|
|
|
@Configuration
|
|
|
+@Slf4j
|
|
|
public class RedisExtProperties {
|
|
|
|
|
|
@Value("${spring.redis.host}")
|
|
@@ -46,7 +49,8 @@ public class RedisExtProperties {
|
|
|
jedisPoolConfig.setMaxIdle(maxIdle);
|
|
|
jedisPoolConfig.setMaxTotal(maxActive);
|
|
|
jedisPoolConfig.setJmxEnabled(false);
|
|
|
- return new JedisPool(jedisPoolConfig, host, port, timeout, null, database);
|
|
|
+ log.info("password is:{},is empty:{},len:{}",password, StringUtils.isEmpty(password),password.length());
|
|
|
+ return new JedisPool(jedisPoolConfig, host, port, timeout, StringUtils.isEmpty(password)? null:password, database);
|
|
|
}
|
|
|
|
|
|
|