这是lettuce的bug
spring-boot-starter-data-redis
引用的是lettuce做为redis的连接方式,所以我们需要用别的代替,比如jedis
在pom依赖中排除lettuce
,再引入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>
<version>3.3.0</version>
</dependency>