【发布时间】:2017-05-20 18:32:21
【问题描述】:
我在我的应用程序中使用 Spring Security 和 Spring Session (v1.3.1)。
我想使用 SpringSessionBackedSessionRegistry 作为我的 Session Registry 并使用 Redis 作为我的 Session 存储库。
SpringSessionBackedSessionRegistry的构造函数如下:
SpringSessionBackedSessionRegistry(FindByIndexNameSessionRepository<ExpiringSession> sessionRepository)
Redis 存储库,RedisOperationsSessionRepository 实现:
FindByIndexNameSessionRepository<org.springframework.session.data.redis.RedisOperationsSessionRepository.RedisSession>
那么,给定RedisOperationsSessionRepository 的实例,我如何构造SpringSessionBackedSessionRegistry 的实例?
为什么SpringSessionBackedSessionRegistry的构造函数不是:
SpringSessionBackedSessionRegistry(FindByIndexNameSessionRepository<? extends ExpiringSession> sessionRepository)
【问题讨论】:
标签: spring spring-boot spring-security spring-session