- 新增 go-redis/v9 依赖 - 新增 config.yaml redis 配置段 + RedisConfig 结构体 + REDIS_PASSWORD 环境变量覆盖 - 新增 common/redis.go Redis 客户端初始化 - 完整实现 session/redis_store.go,实现 Store 接口全部 7 个方法 - Redis TTL 自动过期,无须后台清理 goroutine - deps_core.go 根据 cfg.Redis.Enabled 自动选择 RedisStore/MemoryStore - router.go + main.go 透传 redisClient 参数
7 lines
211 B
Plaintext
7 lines
211 B
Plaintext
# 复制为 .env 后填入真实值
|
|
# .env 会覆盖 config.yaml 中的同名字段
|
|
|
|
DATABASE_PASSWORD=your_password_here
|
|
JWT_SECRET=generate-a-random-64-char-string-here
|
|
REDIS_PASSWORD=your_redis_password_here
|