Things work just fine when I use lettuce version 3.4.x; Looks like lettuce has changed a class contract when it updated to 4.1.x (from abstract class to an interface) and spring-data-redis 1.7.x is not aware of that. I get the following error:
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
Not sure if Spring data redis team is working on it? Or is there a workaround or suggestion that I can use to still keep at 4.1.x version of lettuce?
<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>