springboot 使用 redis
开始没有问题,过一段时间不知道过多久,就会报redis超时。
各种排查都感觉没有问题。
网上果然有类似的问题--- 默认使用的时lettuce 连接池,然后这个包里有bug。
解决办法就是 不要引入这个jar
<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>
测试中,等待结果