From 6f3dd29431b69e1ac498ac21ba056b00e91d524f Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 6 Oct 2017 17:30:36 +0200 Subject: [PATCH] #297 - Re-enable Redis reactive example. Removed fixed versions of dependencies. Removed explicit declaration of Lettuce version as it is now managed by Boot. Switched to Lettuce as primary Redis driver in application setup. We keep using Jedis in the embedded server support. --- redis/pom.xml | 3 ++- redis/reactive/pom.xml | 10 +--------- .../redis/sentinel/RedisSentinelApplication.java | 4 ++-- redis/util/pom.xml | 5 +++++ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/redis/pom.xml b/redis/pom.xml index 114c98f8..c70c16ad 100644 --- a/redis/pom.xml +++ b/redis/pom.xml @@ -18,7 +18,7 @@ cluster example - + reactive repositories sentinel util @@ -41,6 +41,7 @@ + com.github.kstyrc embedded-redis diff --git a/redis/reactive/pom.xml b/redis/reactive/pom.xml index 3684906e..98637fc4 100644 --- a/redis/reactive/pom.xml +++ b/redis/reactive/pom.xml @@ -8,17 +8,10 @@ org.springframework.data.examples spring-data-redis-examples - 1.0.0.BUILD-SNAPSHOT + 2.0.0.BUILD-SNAPSHOT ../pom.xml - - Kay-RC2 - 5.0.0.RC3 - 3.1.0.M3 - 5.0.0.RC1 - - @@ -34,7 +27,6 @@ io.lettuce lettuce-core - ${lettuce.version} diff --git a/redis/sentinel/src/main/java/example/springdata/redis/sentinel/RedisSentinelApplication.java b/redis/sentinel/src/main/java/example/springdata/redis/sentinel/RedisSentinelApplication.java index f063086c..ebbd6ece 100644 --- a/redis/sentinel/src/main/java/example/springdata/redis/sentinel/RedisSentinelApplication.java +++ b/redis/sentinel/src/main/java/example/springdata/redis/sentinel/RedisSentinelApplication.java @@ -24,7 +24,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisSentinelConfiguration; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.util.StopWatch; @@ -74,7 +74,7 @@ public class RedisSentinelApplication { } public @Bean RedisConnectionFactory connectionFactory() { - return new JedisConnectionFactory(sentinelConfig()); + return new LettuceConnectionFactory(sentinelConfig()); } public @Bean RedisSentinelConfiguration sentinelConfig() { diff --git a/redis/util/pom.xml b/redis/util/pom.xml index e4a7b390..28a625de 100644 --- a/redis/util/pom.xml +++ b/redis/util/pom.xml @@ -19,6 +19,11 @@ junit + + redis.clients + jedis + + com.github.kstyrc embedded-redis