文章目录 介绍 pom文件 yaml 更改序列化器 启动类加注解@EnableRedisHttpSession 同步对象 @EnableRedisHttpSession 失效时间 redisNamespace 使用 介绍 采用外置的Redis来存储session,以此来解决session共享的问题 大概思想就是弄个拦截器,拦截setAttribute和getAttribute的方法,将其存储到redis pom文件 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web