Update Samples and Guides to use Lettuce

Favor lettuce because of multiplexing and improved scalability.
Using lettuce requires a fixed number of connections hence using
lettuce improves application scalability.

Fixes gh-652
This commit is contained in:
Mark Paluch
2016-10-25 21:22:22 +02:00
committed by Rob Winch
parent 7b65d7930b
commit e4fe53abf8
26 changed files with 97 additions and 53 deletions

View File

@@ -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