Session 与分布式应用(对比前端 localStorage) 1. 为什么需要集中管理 Session? // ❌ 前端存登录态的做法 localStorage.setItem('token', 'jwt_token_xxx'); // 每次请求带 token,服务器验证签名 Mr.Ding大约 4 分钟redisSession分布式登录前端转后端