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

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

Introduction

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

Prototype

public String getHost() 

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