Files
dc-solon-gateway/.claude/memory/architecture-local-passthrough.md
T
lianlonggangandClaude 020f112124 feat: 完成数据中心转发网关核心功能(真实联调通过)
核心功能(已连接真实源服务器验证):
- /sys/watchUserLogin 本地处理:RSA解密验证设备密码(防伪造) + 单飞换token + Redis缓存
- 业务接口经本地通配Controller手动HttpUtils透传至源服务器 + 401检测清缓存
- token失效三重自愈:10秒探活 + 预过期刷新 + 被动401兜底

配置隔离(dotenv风格)+ 安全:
- .env 存敏感信息不入库;app.yml 用 ${KEY} 占位符引用;EnvLoader启动前加载
- 移除fastjson(规避0day),JSON改用Solon内置snack4

联调修复多个Solon实际API问题(配置文件名/YAML插件/打包/redisx/注解路径等)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-05 15:32:17 +08:00

13 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: architecture-local-passthrough
description: 为何用本地通配Controller+HttpUtils手动透传,而非solon.cloud.gateway.routes路由透传
metadata:
type: project
---
本项目业务接口透传采用「本地通配 Controller(`@Mapping("/**")`+ HttpUtils 手动透传」,而非 `solon.cloud.gateway.routes` 路由透传。
**Why:** 调研发现 Solon Cloud Gateway 的路由匹配中,`Path=/**` 兜底路由会**覆盖本地 Controller**,导致 `/sys/watchUserLogin` 被透传到源服务器而非本地处理——这会使规避风控的核心需求失效。而用 CloudGatewayFilter 短路拦截 watchUserLogin 时,获取 reactive 请求体(password)的 API 复杂不确定。
**How to apply:** 保持 TokenController`@Mapping("/sys/watchUserLogin")` 具体路径)与 GatewayController`@Mapping("/**")` 通配)并存,依赖 Solon 本地路由器「具体路径优先于通配」的特性。若未来要换回流式透传,需先确认本地 Controller 能优先于路由匹配。相关坑点见 [[solon-pitfalls]]。