Search in sources :

Example 1 with SpringSessionRedisConnectionFactory

use of org.springframework.session.data.redis.config.annotation.SpringSessionRedisConnectionFactory in project spring-session by spring-projects.

the class RedisHttpSessionConfiguration method setRedisConnectionFactory.

@Autowired
public void setRedisConnectionFactory(@SpringSessionRedisConnectionFactory ObjectProvider<RedisConnectionFactory> springSessionRedisConnectionFactory, ObjectProvider<RedisConnectionFactory> redisConnectionFactory) {
    RedisConnectionFactory redisConnectionFactoryToUse = springSessionRedisConnectionFactory.getIfAvailable();
    if (redisConnectionFactoryToUse == null) {
        redisConnectionFactoryToUse = redisConnectionFactory.getObject();
    }
    this.redisConnectionFactory = redisConnectionFactoryToUse;
}
Also used : SpringSessionRedisConnectionFactory(org.springframework.session.data.redis.config.annotation.SpringSessionRedisConnectionFactory) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) Autowired(org.springframework.beans.factory.annotation.Autowired)

Aggregations

Autowired (org.springframework.beans.factory.annotation.Autowired)1 RedisConnectionFactory (org.springframework.data.redis.connection.RedisConnectionFactory)1 SpringSessionRedisConnectionFactory (org.springframework.session.data.redis.config.annotation.SpringSessionRedisConnectionFactory)1