Förutsatt att du har konfigurerat Spring Session korrekt (med Spring Boot 1.5.x det skulle vara genom att ställa in spring.session.store-type konfigurationsegenskapen till redis , eller uttryckligen genom att använda @EnableRedisHttpSession ), bör du kunna använda FindByIndexNameSessionRepository<? extends ExpiringSession> . Till exempel:
@Autowired
FindByIndexNameSessionRepository<? extends ExpiringSession> sessionRepository;