修正Redis服务器没有设置密码,但客户端向其发送身份验证请求的问题

dependabot/maven/office-plugin/commons-io-commons-io-2.7
youken9980 4 years ago committed by kl
parent 831550d847
commit ac2115114c

@ -33,7 +33,7 @@ office.home = ${KK_OFFICE_HOME:default}
cache.type = ${KK_CACHE_TYPE:jdk}
#rediscache.type = redis
spring.redisson.address = ${KK_SPRING_REDISSON_ADDRESS:127.0.0.1:6379}
spring.redisson.password = ${KK_SPRING_REDISSON_PASSWORD:123456}
spring.redisson.password = ${KK_SPRING_REDISSON_PASSWORD:}
# true
cache.clean.enabled = ${KK_CACHE_CLEAN_ENABLED:true}
#cache.clean.enabled = truecronQuartz cron

@ -1,6 +1,7 @@
package cn.keking.config;
import io.netty.channel.nio.NioEventLoopGroup;
import org.apache.commons.lang3.StringUtils;
import org.redisson.client.codec.Codec;
import org.redisson.config.Config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
@ -63,7 +64,7 @@ public class RedissonConfig {
.setConnectTimeout(connectTimeout)
.setIdleConnectionTimeout(idleConnectionTimeout)
.setPingTimeout(pingTimeout)
.setPassword(password);
.setPassword(StringUtils.trimToNull(password));
Codec codec=(Codec) ClassUtils.forName(getCodec(), ClassUtils.getDefaultClassLoader()).newInstance();
config.setCodec(codec);
config.setThreads(thread);

Loading…
Cancel
Save