fix(config): 摘除 jar 内本地出站配置,修线上 GetUserInfo 连 localhost:8060
build / build-push (push) Successful in 1m6s
build / build-push (push) Successful in 1m6s
9cc0b06 为本地验签联调把 yh.open.services.userbase: http://localhost:8060 写进
jar 内 application.yml:服务目录第②级 services 永远压过平台注入的
YH_OPEN_BASE_HOST(只喂第③级枚举兜底),部署后容器内对 UserBase 的全部调用
(/api/base/GetUserInfo → /oapi/user/byLoginName)解析到容器 localhost:8060,
Connection refused → code=6 内部服务错误。
- services 覆盖从 jar 摘除:本地联调改运行时注入
YH_OPEN_SERVICES_USERBASE=http://localhost:8060
- flow-center.usermsg.enabled 置回 false、base-url 注释掉:同批本地值不再随
jar 出厂(生产未部署 UserMsg,enabled=true 会对 localhost:8080 空转告警);
本地经 FLOWCENTER_USERMSG_ENABLED / FLOWCENTER_USERMSG_BASEURL 注入
This commit is contained in:
@@ -67,17 +67,19 @@ yh:
|
||||
"100617": "2a3b4c5d6e7f8091a2b3c4d5e6f70819"
|
||||
open:
|
||||
# 身份密钥唯一来源 = yh.app-auth(本文件 app-auth 段),open.* 副本已删;
|
||||
# 本地全链测试:指向 local-debug 的 UserBase(本地部署无 context-path,必须经 services 显式
|
||||
# 覆盖枚举兜底的 /userbase 前缀,否则签名剥离与服务端不对齐 → 验签失败);
|
||||
# 生产改回 base.yunhaixingtong.com(经 Caddy 挂 /userbase,届时删掉 services 覆盖)
|
||||
# base-host 是「服务目录三级兜底」的输入(userbase 目标 = base-host + 枚举 ctx /userbase):
|
||||
# 本地指向 local-debug 的 UserBase;生产由平台注入 YH_OPEN_BASE_HOST 覆盖(base.yunhaixingtong.com)。
|
||||
# ⚠️ 本地 UserBase 无 context-path,要对齐签名必须显式覆盖目录条目,但那份覆盖只能走运行时注入:
|
||||
# YH_OPEN_SERVICES_USERBASE=http://localhost:8060 mvn -o spring-boot:run
|
||||
# 绝不能写进本文件:yh.open.services.{key} 是目录第 2 级,平台注入的 base-host 只喂第 3 级兜底、
|
||||
# 压不过它 —— 写进 jar 会让部署实例去连容器内的 localhost:8060(2026-09-18 事故:
|
||||
# Connection refused → 所有 /api/* 报 code=6 内部服务错误)。
|
||||
base-host: http://localhost:8060
|
||||
base-path: ""
|
||||
# 服务目录(子应用配置优化方案 §4.2):显式覆盖 PlatformService 枚举兜底的 /userbase basePath;
|
||||
# usermsg 未部署时无需配置(enabled=false 即不解析);部署后配容器直连完整 URL
|
||||
services:
|
||||
userbase: http://localhost:8060
|
||||
# usermsg 未部署时无需配置(enabled=false 即不解析);部署后配容器直连完整 URL
|
||||
# usermsg: http://localhost:8080
|
||||
# 服务目录(子应用配置优化方案 §4.2):只在需要覆盖 PlatformService 枚举默认 ctx 时按 key 配置;
|
||||
# prod 形态(网关域名 + 默认 ctx)下四域零配置。本地联调所需的 userbase 覆盖见上方环境变量。
|
||||
# services:
|
||||
# usermsg: http://localhost:8080
|
||||
|
||||
# ===== 流程中心专属配置 =====
|
||||
flow-center:
|
||||
@@ -104,11 +106,12 @@ flow-center:
|
||||
alert-user-ids: ""
|
||||
usermsg:
|
||||
# 站内信/待办推送:主路径 = SDK 门面 YschMsgOpenApi(服务目录 yh.open.services.usermsg);
|
||||
# legacy 回落键 base-url 已删(无默认值)——enabled=true 且两者皆缺时构造期 fail-fast。
|
||||
# 本地 8080 起 UserMsg 后置 true;生产 UserMsg 未部署 → false(显式关闭,消除空转告警)。
|
||||
enabled: true
|
||||
# base-url legacy 回落(仅迁移期兜底,正常不用配):见上方 open.services.usermsg
|
||||
base-url: http://localhost:8080
|
||||
# legacy 回落键 base-url(仅迁移期兜底,正常不用配)——enabled=true 且两者皆缺时构造期 fail-fast。
|
||||
# jar 默认 false(生产 UserMsg 未部署 → 显式关闭,消除空转告警);本地起 UserMsg(8080) 后
|
||||
# 用运行时注入开启,勿把本地值写进本文件随 jar 出厂(理由同上方 yh.open):
|
||||
# FLOWCENTER_USERMSG_ENABLED=true FLOWCENTER_USERMSG_BASEURL=http://localhost:8080 mvn -o spring-boot:run
|
||||
enabled: false
|
||||
# base-url: http://localhost:8080
|
||||
|
||||
logging:
|
||||
level:
|
||||
|
||||
Reference in New Issue
Block a user