Skip to content

Commit

Permalink
cachecloud 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
githubname1024 committed Aug 5, 2024
1 parent 8d78286 commit cbda358
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.sohu.cache.redis.AssistRedisService;
import com.sohu.cache.redis.util.Command;
import com.sohu.cache.redis.util.ProtostuffSerializer;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -44,7 +45,12 @@ public class AssistRedisServiceImpl implements AssistRedisService {
@PostConstruct
public void init() {
GenericObjectPoolConfig config = new GenericObjectPoolConfig();
jedisPoolMain = new JedisPool(config, mainHost, mainPort, Protocol.DEFAULT_TIMEOUT, mainPassword);
if(StringUtils.isNotBlank(mainPassword)){
jedisPoolMain = new JedisPool(config, mainHost, mainPort, Protocol.DEFAULT_TIMEOUT, mainPassword);
}else{
logger.error("The assist redis password is not configured, please confirm and strongly recommend config it.");
jedisPoolMain = new JedisPool(config, mainHost, mainPort, Protocol.DEFAULT_TIMEOUT);
}
}

/**
Expand Down

0 comments on commit cbda358

Please sign in to comment.