diff --git a/docs/build.gradle b/docs/build.gradle
index ddf79adb..201d22e6 100644
--- a/docs/build.gradle
+++ b/docs/build.gradle
@@ -43,7 +43,7 @@ dependencies {
"org.springframework:spring-test:$springVersion",
"org.assertj:assertj-core:$assertjVersion",
"com.hazelcast:hazelcast:$hazelcastVersion",
- "redis.clients:jedis:2.4.1",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"javax.servlet:javax.servlet-api:$servletApiVersion"
}
@@ -58,6 +58,7 @@ asciidoctor {
'download-url' : "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip",
'spring-session-version' : version,
'spring-version' : springVersion,
+ 'lettuce-version' : lettuceVersion,
'hazelcast-version' : hazelcastVersion,
'docs-itest-dir' : rootProject.projectDir.path + '/docs/src/integration-test/java/',
'docs-test-dir' : rootProject.projectDir.path + '/docs/src/test/java/',
diff --git a/docs/src/docs/asciidoc/guides/custom-cookie.adoc b/docs/src/docs/asciidoc/guides/custom-cookie.adoc
index fccb99c8..d425be1c 100644
--- a/docs/src/docs/asciidoc/guides/custom-cookie.adoc
+++ b/docs/src/docs/asciidoc/guides/custom-cookie.adoc
@@ -79,7 +79,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/httpsession-xml.adoc b/docs/src/docs/asciidoc/guides/httpsession-xml.adoc
index 98cc6592..6b555963 100644
--- a/docs/src/docs/asciidoc/guides/httpsession-xml.adoc
+++ b/docs/src/docs/asciidoc/guides/httpsession-xml.adoc
@@ -23,6 +23,11 @@ If you are using Maven, ensure to add the following dependencies:
{spring-session-version}
pom
+
+ biz.paluch.redis
+ lettuce
+ {lettuce-version}
+
org.springframework
spring-web
@@ -129,7 +134,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/httpsession.adoc b/docs/src/docs/asciidoc/guides/httpsession.adoc
index c4bdb5c9..9815d7a4 100644
--- a/docs/src/docs/asciidoc/guides/httpsession.adoc
+++ b/docs/src/docs/asciidoc/guides/httpsession.adoc
@@ -23,6 +23,11 @@ If you are using Maven, ensure to add the following dependencies:
{spring-session-version}
pom
+
+ biz.paluch.redis
+ lettuce
+ {lettuce-version}
+
org.springframework
spring-web
@@ -121,7 +126,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/rest.adoc b/docs/src/docs/asciidoc/guides/rest.adoc
index 65c368a8..503193e8 100644
--- a/docs/src/docs/asciidoc/guides/rest.adoc
+++ b/docs/src/docs/asciidoc/guides/rest.adoc
@@ -23,6 +23,11 @@ If you are using Maven, ensure to add the following dependencies:
{spring-session-version}
pom
+
+ biz.paluch.redis
+ lettuce
+ {lettuce-version}
+
org.springframework
spring-web
@@ -122,7 +127,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/security.adoc b/docs/src/docs/asciidoc/guides/security.adoc
index 7f33e952..86a0f5ff 100644
--- a/docs/src/docs/asciidoc/guides/security.adoc
+++ b/docs/src/docs/asciidoc/guides/security.adoc
@@ -19,15 +19,20 @@ If you are using Maven, ensure to add the following dependencies:
- org.springframework.session
- spring-session-data-redis
- {spring-session-version}
- pom
+ org.springframework.session
+ spring-session-data-redis
+ {spring-session-version}
+ pom
- org.springframework
- spring-web
- {spring-version}
+ biz.paluch.redis
+ lettuce
+ {lettuce-version}
+
+
+ org.springframework
+ spring-web
+ {spring-version}
----
@@ -126,7 +131,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/users.adoc b/docs/src/docs/asciidoc/guides/users.adoc
index 3b1043b3..b0a1dc18 100644
--- a/docs/src/docs/asciidoc/guides/users.adoc
+++ b/docs/src/docs/asciidoc/guides/users.adoc
@@ -20,7 +20,7 @@ You can run the sample by obtaining the {download-url}[source code] and invoking
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/docs/asciidoc/guides/websocket.adoc b/docs/src/docs/asciidoc/guides/websocket.adoc
index 313e6371..07f8275f 100644
--- a/docs/src/docs/asciidoc/guides/websocket.adoc
+++ b/docs/src/docs/asciidoc/guides/websocket.adoc
@@ -85,7 +85,7 @@ include::{samples-dir}websocket/src/main/java/sample/config/WebSecurityConfig.ja
[NOTE]
====
For the sample to work, you must http://redis.io/download[install Redis 2.8+] on localhost and run it with the default port (6379).
-Alternatively, you can update the `JedisConnectionFactory` to point to a Redis server.
+Alternatively, you can update the `LettuceConnectionFactory` to point to a Redis server.
====
----
diff --git a/docs/src/test/java/docs/IndexDocTests.java b/docs/src/test/java/docs/IndexDocTests.java
index 389d5251..af2b8743 100644
--- a/docs/src/test/java/docs/IndexDocTests.java
+++ b/docs/src/test/java/docs/IndexDocTests.java
@@ -22,7 +22,7 @@ import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import org.junit.Test;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.mock.web.MockServletContext;
@@ -110,7 +110,7 @@ public class IndexDocTests {
@SuppressWarnings("unused")
public void newRedisOperationsSessionRepository() {
// tag::new-redisoperationssessionrepository[]
- JedisConnectionFactory factory = new JedisConnectionFactory();
+ LettuceConnectionFactory factory = new LettuceConnectionFactory();
SessionRepository extends ExpiringSession> repository = new RedisOperationsSessionRepository(
factory);
// end::new-redisoperationssessionrepository[]
diff --git a/gradle.properties b/gradle.properties
index e8ab1300..77d723a1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,6 +8,7 @@ version=1.3.0.BUILD-SNAPSHOT
# TODO: upgrade to SD Redis 1.7.4.RELEASE - spring3Test suite Redis tests fail due to upgrade...
# Caused by: java.lang.NoSuchMethodError: org.springframework.core.serializer.support.DeserializingConverter.(Ljava/lang/ClassLoader;)V
springDataRedisVersion=1.7.1.RELEASE
+lettuceVersion=3.5.0.Final
html5ShivVersion=3.7.3
commonsLoggingVersion=1.2
junitVersion=4.12
diff --git a/samples/custom-cookie/build.gradle b/samples/custom-cookie/build.gradle
index b76730d4..7edb6f84 100644
--- a/samples/custom-cookie/build.gradle
+++ b/samples/custom-cookie/build.gradle
@@ -3,8 +3,11 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework:spring-web:$springVersion",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework:spring-web:$springVersion",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
diff --git a/samples/custom-cookie/src/main/java/sample/Config.java b/samples/custom-cookie/src/main/java/sample/Config.java
index 8b06bbf9..92bff82f 100644
--- a/samples/custom-cookie/src/main/java/sample/Config.java
+++ b/samples/custom-cookie/src/main/java/sample/Config.java
@@ -17,7 +17,7 @@
package sample;
import org.springframework.context.annotation.Bean;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.CookieSerializer;
import org.springframework.session.web.http.DefaultCookieSerializer;
@@ -26,8 +26,8 @@ import org.springframework.session.web.http.DefaultCookieSerializer;
public class Config {
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory();
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory();
}
// tag::cookie-serializer[]
diff --git a/samples/httpsession-redis-json/build.gradle b/samples/httpsession-redis-json/build.gradle
index b4bf15a1..71f6f09d 100644
--- a/samples/httpsession-redis-json/build.gradle
+++ b/samples/httpsession-redis-json/build.gradle
@@ -28,6 +28,7 @@ dependencies {
"org.springframework.boot:spring-boot-starter-thymeleaf",
"org.springframework.boot:spring-boot-starter-security",
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.apache.httpcomponents:httpclient"
testCompile "org.springframework.boot:spring-boot-starter-test",
diff --git a/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java b/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java
index f8adf68d..fdb9c5f0 100644
--- a/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java
+++ b/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java
@@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.context.annotation.Bean;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.security.jackson2.SecurityJackson2Modules;
@@ -39,8 +39,8 @@ public class SessionConfig implements BeanClassLoaderAware {
}
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory();
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory();
}
/**
diff --git a/samples/httpsession-xml/build.gradle b/samples/httpsession-xml/build.gradle
index b76730d4..7edb6f84 100644
--- a/samples/httpsession-xml/build.gradle
+++ b/samples/httpsession-xml/build.gradle
@@ -3,8 +3,11 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework:spring-web:$springVersion",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework:spring-web:$springVersion",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
diff --git a/samples/httpsession-xml/src/main/webapp/WEB-INF/spring/session.xml b/samples/httpsession-xml/src/main/webapp/WEB-INF/spring/session.xml
index 46b27fe3..4b569357 100644
--- a/samples/httpsession-xml/src/main/webapp/WEB-INF/spring/session.xml
+++ b/samples/httpsession-xml/src/main/webapp/WEB-INF/spring/session.xml
@@ -13,6 +13,6 @@
-
+
\ No newline at end of file
diff --git a/samples/httpsession/build.gradle b/samples/httpsession/build.gradle
index b76730d4..7edb6f84 100644
--- a/samples/httpsession/build.gradle
+++ b/samples/httpsession/build.gradle
@@ -3,8 +3,11 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework:spring-web:$springVersion",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework:spring-web:$springVersion",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
diff --git a/samples/httpsession/src/main/java/sample/Config.java b/samples/httpsession/src/main/java/sample/Config.java
index d33bb287..4a03dd74 100644
--- a/samples/httpsession/src/main/java/sample/Config.java
+++ b/samples/httpsession/src/main/java/sample/Config.java
@@ -17,7 +17,7 @@
package sample;
import org.springframework.context.annotation.Bean;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
// tag::class[]
@@ -25,8 +25,8 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
public class Config {
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory(); // <2>
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory(); // <2>
}
}
// end::class[]
diff --git a/samples/rest/build.gradle b/samples/rest/build.gradle
index e8628846..ec8665d7 100644
--- a/samples/rest/build.gradle
+++ b/samples/rest/build.gradle
@@ -3,7 +3,10 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "biz.paluch.redis:lettuce:$lettuceVersion",
"org.springframework:spring-webmvc:$springVersion",
"org.springframework.security:spring-security-config:$springSecurityVersion",
"org.springframework.security:spring-security-web:$springSecurityVersion",
diff --git a/samples/rest/src/main/java/sample/HttpSessionConfig.java b/samples/rest/src/main/java/sample/HttpSessionConfig.java
index d1b22ab1..5fc10a6c 100644
--- a/samples/rest/src/main/java/sample/HttpSessionConfig.java
+++ b/samples/rest/src/main/java/sample/HttpSessionConfig.java
@@ -18,7 +18,7 @@ package sample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.HeaderHttpSessionStrategy;
import org.springframework.session.web.http.HttpSessionStrategy;
@@ -29,8 +29,8 @@ import org.springframework.session.web.http.HttpSessionStrategy;
public class HttpSessionConfig {
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory(); // <2>
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory(); // <2>
}
@Bean
diff --git a/samples/security/build.gradle b/samples/security/build.gradle
index 26c85f22..03a0758a 100644
--- a/samples/security/build.gradle
+++ b/samples/security/build.gradle
@@ -3,10 +3,13 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework:spring-web:$springVersion",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework:spring-web:$springVersion",
"org.springframework.security:spring-security-config:$springSecurityVersion",
"org.springframework.security:spring-security-web:$springSecurityVersion",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
diff --git a/samples/security/src/main/java/sample/Config.java b/samples/security/src/main/java/sample/Config.java
index ecfa7bfe..384e090a 100644
--- a/samples/security/src/main/java/sample/Config.java
+++ b/samples/security/src/main/java/sample/Config.java
@@ -18,7 +18,7 @@ package sample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
// tag::class[]
@@ -27,8 +27,8 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
public class Config {
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory(); // <2>
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory(); // <2>
}
}
// end::class[]
diff --git a/samples/users/build.gradle b/samples/users/build.gradle
index cc261acf..7edb6f84 100644
--- a/samples/users/build.gradle
+++ b/samples/users/build.gradle
@@ -3,9 +3,12 @@ apply from: TOMCAT_7_GRADLE
apply from: SAMPLE_GRADLE
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework:spring-web:$springVersion",
- "org.webjars:bootstrap:3.3.6",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework:spring-web:$springVersion",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
+ "org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:webjars-taglib:$webjarsTaglibVersion",
jstlDependencies
diff --git a/samples/users/src/main/java/sample/Config.java b/samples/users/src/main/java/sample/Config.java
index ae02ba00..2356e748 100644
--- a/samples/users/src/main/java/sample/Config.java
+++ b/samples/users/src/main/java/sample/Config.java
@@ -18,7 +18,7 @@ package sample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
/**
@@ -31,8 +31,8 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
public class Config {
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory();
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory();
}
}
// end::class[]
diff --git a/samples/websocket/build.gradle b/samples/websocket/build.gradle
index e3a063d0..0d377678 100644
--- a/samples/websocket/build.gradle
+++ b/samples/websocket/build.gradle
@@ -16,8 +16,10 @@ apply from: SAMPLE_GRADLE
group = 'samples'
dependencies {
- compile project(':spring-session-data-redis'),
- "org.springframework.boot:spring-boot-starter-web",
+ compile(project(':spring-session-data-redis')) {
+ exclude module: 'jedis'
+ }
+ compile "org.springframework.boot:spring-boot-starter-web",
"org.springframework.boot:spring-boot-starter-data-jpa",
"org.springframework.boot:spring-boot-starter-thymeleaf",
"org.springframework.boot:spring-boot-starter-websocket",
@@ -25,6 +27,7 @@ dependencies {
"org.springframework.data:spring-data-jpa",
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect",
"org.thymeleaf.extras:thymeleaf-extras-conditionalcomments",
+ "biz.paluch.redis:lettuce:$lettuceVersion",
"org.webjars:bootstrap:$bootstrapVersion",
"org.webjars:html5shiv:$html5ShivVersion",
"org.webjars:knockout:2.3.0",
diff --git a/samples/websocket/src/main/java/sample/config/DataSourceConfig.java b/samples/websocket/src/main/java/sample/config/DataSourceConfig.java
index 2ac6e04a..b8e5a555 100644
--- a/samples/websocket/src/main/java/sample/config/DataSourceConfig.java
+++ b/samples/websocket/src/main/java/sample/config/DataSourceConfig.java
@@ -20,7 +20,7 @@ import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
@@ -34,7 +34,7 @@ public class DataSourceConfig {
}
@Bean
- public JedisConnectionFactory connectionFactory() {
- return new JedisConnectionFactory();
+ public LettuceConnectionFactory connectionFactory() {
+ return new LettuceConnectionFactory();
}
}