1.问题

一会儿不操作控制台就提示

[ioEventLoop-4-3] i.l.core.protocol.ReconnectionHandler    : Reconnected to *****:6379

造成重连响应很慢,体验极差

2.使用的是lettuce 连接池,这个东西有bug,所以替换成jedis

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.lettuce</groupId>
                    <artifactId>lettuce-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>
spring.redis.jedis.pool.max-active=20
spring.redis.jedis.pool.max-wait=-1
#最大阻塞等待时间(负数表示没限制)
spring.redis.jedis.pool.max-idle=5
spring.redis.jedis.pool.min-idle=0

如上替换,我解决了重连问题