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

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

Introduction

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

Prototype

public int getPort() 

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