Example usage for org.springframework.boot.autoconfigure.data.redis RedisProperties getPassword

List of usage examples for org.springframework.boot.autoconfigure.data.redis RedisProperties getPassword

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.data.redis RedisProperties getPassword.

Prototype

public String getPassword() 

Source Link

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;
}