SpringBoot集成redisson-spring-boot-starter报错:
点击查看代码
2022-10-31 09:30:10.255 WARN 92312 --- [isson-netty-2-4] io.netty.util.concurrent.DefaultPromise : An exception was thrown by org.redisson.misc.RedissonPromise$$Lambda$424/133587693.operationComplete()
java.lang.AbstractMethodError: org.redisson.spring.data.connection.RedissonReactiveRedisConnection.close()V
at org.springframework.boot.actuate.redis.RedisReactiveHealthIndicator.lambda$doHealthCheck$1(RedisReactiveHealthIndicator.java:50) ~[spring-boot-actuator-2.0.6.RELEASE.jar:2.0.6.RELEASE]
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.runFinally(FluxDoFinally.java:156) ~[reactor-core-3.1.10.RELEASE.jar:3.1.10.RELEASE]
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onComplete(FluxDoFinally.java:139) ~[reactor-core-3.1.10.RELEASE.jar:3.1.10.RELEASE]
错误的pom依赖:
点击查看代码
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.16.0</version>
</dependency>
正确的pom依赖:
点击查看代码
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>3.16.0</version>
<exclusions>
<exclusion>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-data-24</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-data-20</artifactId>
<version>3.16.0</version>
</dependency>
原因:
SpringBoot 1.x 与SpringBoot 2.x 对于Redis 组件支持的优化调整
标签:Redisson,SpringBoot,spring,boot,redisson,报错,RELEASE,org From: https://www.cnblogs.com/zlonger/p/16843291.html