初学Springboot 集成Redis 异常RedisCommandTimeoutException
异常:
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 1 millisecond(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51) ~[lettuce-core-5.1.3.RELEASE.jar:na]
…
application.properties
spring.redis.database=1
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.pool.max-active=1000
spring.redis.pool.max-wait=-1
spring.redis.pool.max-idle=10
spring.redis.pool.min-idle=1
spring.redis.timeout=1
导致原因timeout 太小,timeout单位是毫秒换成300左右就可以了