2

当我使用生菜 3.4.x 版时,一切正常;看起来生菜在更新到 4.1.x(从抽象类到接口)时更改了类合同,而 spring-data-redis 1.7.x 并不知道这一点。我收到以下错误:

BeanInstantiationException: Failed to instantiate
[org.springframework.data.redis.core.RedisKeyValueAdapter]: Constructor threw exception; 
nested exception is java.lang.IncompatibleClassChangeError: 
class org.springframework.data.redis.connection.lettuce.BytesRedisCodec has
interface com.lambdaworks.redis.codec.RedisCodec as super class 

不确定 Spring data redis 团队是否正在研究它?或者是否有一种解决方法或建议可以让我仍然保持 4.1.x 版本的生菜?

    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-redis</artifactId>
        <version>1.7.0.RC1</version>
    </dependency>
    <dependency>
        <groupId>biz.paluch.redis</groupId>
        <artifactId>lettuce</artifactId>
        <version>4.1.1.Final</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <optional>true</optional>
    </dependency>
4

0 回答 0