<!-- redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- redis-session -->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
设置redis中的session有效时间为
@EnableRedisHttpSession(maxInactiveIntervalInSeconds= 7200)
可以查看https://www.cnblogs.com/sanri1993/p/12120486.html
spring session 官方文档:https://docs.spring.io/spring-session/docs/2.2.0.RELEASE/reference/html5/