Configure Redis Client Drivers (Jedis vs Lettuce)
developThe module supports both Jedis and Lettuce drivers. Spring Boot will automatically configure the connection factory based on which driver is present on your classpath:
- Jedis: Synchronous client. Selected by default if Jedis is on the classpath.
- Lettuce: Asynchronous/reactive client. Supports cluster mode.
To explicitly force the use of Lettuce, set the following property:
spring.data.redis.client-type=lettuce.
The module ensures that LettuceConnectionFactory and JedisConnectionFactory beans are correctly ordered to depend on the embedded Redis container startup.
spring.data.redis.client-type=lettuce