The calling method‘s class, org.redisson.spring.data.connection.RedissonConnection

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.redisson.spring.data.connection.RedissonConnection.<clinit>(RedissonConnection.java:1764)

The following method did not exist:

    org/redisson/client/protocol/RedisStrictCommand.<init>(Ljava/lang/String;Ljava/lang/String;Lorg/redisson/client/protocol/Decoder;)V

The calling method's class, org.redisson.spring.data.connection.RedissonConnection, was loaded from the following location:

    jar:file://.m2/repository/org/redisson/redisson-spring-data-22/3.12.3/redisson-spring-data-22-3.12.3.jar!/org/redisson/spring/data/connection/RedissonConnection.class

The called method's class, org.redisson.client.protocol.RedisStrictCommand, is available from the following locations:

    jar:file:/C://.m2/repository/org/redisson/redisson/3.17.6/redisson-3.17.6.jar!/org/redisson/client/protocol/RedisStrictCommand.class

The called method's class hierarchy was loaded from the following locations:

这个错误提示显示在 org.redisson.spring.data.connection.RedissonConnection 类的静态初始化块中调用了一个不存在的方法 org.redisson.client.protocol.RedisStrictCommand.(Ljava/lang/String;Ljava/lang/String;Lorg/redisson/client/protocol/Decoder;)V。

这个错误可能是由于 Redisson 的版本不兼容导致的。在 Redisson 3.17.6 中,RedisStrictCommand 类中存在该构造方法,但在 Redisson 3.12.3 中,该构造方法可能已经被删除或者改名了。

为了解决这个问题,您可以尝试以下步骤:

确认您的项目中使用的 Redisson 版本是否正确,并且与您的其他依赖项兼容。您可以在项目的 pom.xml 文件中确认 Redisson 的版本。

尝试升级 Redisson 版本到最新版本,或者将 Redisson 版本降级到与其他依赖项兼容的版本。

如果您使用的是 Spring Boot,可以尝试使用 Spring Boot 的依赖管理功能来管理 Redisson 依赖项的版本,例如:

  <dependencyManagement>
       <dependencies>
           <dependency>
               <groupId>org.redisson</groupId>
               <artifactId>redisson-spring-boot-starter</artifactId>
               <version>3.17.6</version>
           </dependency>
       </dependencies>
   </dependencyManagement>

这样可以确保 Redisson 依赖项的版本与 Spring Boot 的版本兼容。在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/uniquewonderq/article/details/132365322