Example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory setPassword

List of usage examples for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory setPassword

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection.lettuce LettuceConnectionFactory setPassword.

Prototype

@Deprecated
public void setPassword(String password) 

Source Link

Document

Sets the password used for authenticating with the Redis server.

Usage

From source file:io.pivotal.cla.config.SessionConfig.java

@Bean
@ConditionalOnMissingBean(RedisConnectionFactory.class)
public RedisConnectionFactory redisConnectionFactory(RedisProperties redisProperties) {

    LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory();
    connectionFactory.setPort(redisProperties.getPort());
    connectionFactory.setHostName(redisProperties.getHost());
    connectionFactory.setPassword(redisProperties.getPassword());
    connectionFactory.setShutdownTimeout(0);

    return connectionFactory;
}