spring session设置过期时间
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 60)
这个注解添加到启动类上,则session的过期时间为60秒
参考资料:
https://docs.spring.io/spring-session/reference/guides/boot-redis.html
https://developpaper.com/spring-redis-session-custom-key-and-expiration-time/

浙公网安备 33010602011771号