レタスのバージョン 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 データ 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>