refactor(flow): 回调端点收敛为 starter 默认 /oapi/flow/callback + 开漂移自动核对
build / build-push (push) Successful in 1m5s

网关契约 /{target}/oapi/** 的首段已由 target 承担,应用内端点再加一段
<target> 是冗余(Notice 的 /oapi/notice/flow/callback 属历史遗留:其 oapi
Controller 统一建在 /oapi/notice/** 下)。

- application.yml: notice.flow.callback-path 与 yh.flow-callback.path
  由 /oapi/notice/flow/callback 收敛为 /oapi/flow/callback
- application.yml: 摘除显式 callback-url,注册地址改由 starter 推导
  (open-host ?: yh.open.base-host) + /{target ?: base-path} + path
  ⇒ 生产 = http://open-gateway-service:10013/notice/oapi/flow/callback
  回滚绳:把全地址写回 callback-url 即可,无需回滚镜像
- application.yml: 开 reconcile-on-register=true —— 端点/ctx/base-path
  变更后镜像行有效但登记 URL 不一致时自动重注册,替代"删镜像行→重新保存
  绑定"的手工恢复路径(注意:重注册会轮换 secret)
- NoticeFlowProperties: callbackPath 默认值同步
- 测试 4 处同步冻结字面量/硬编码路径/断言

测试:mvn -o test → 114/114 通过(含 NoticeFlowApiIT 9 例、FlowCallbackTransientIT
1 例在真实过滤链上按新端点 200)
This commit is contained in:
chenxing
2026-09-24 11:57:01 +08:00
parent 58aadaa95a
commit a7e93cb22d
6 changed files with 26 additions and 14 deletions
@@ -31,8 +31,10 @@ public class NoticeFlowProperties {
/**
* 回调路径:挂在开放接口域下,由平台应用验签(/oapi/* 强制)保护,不再有独立回调过滤器。
* 取 starter 默认形态 /oapi/flow/callback——网关契约 /{target}/oapi/** 的首段已由 target
* 承担,端点内不再带应用名前缀(2026-09-24 由 /oapi/notice/flow/callback 收敛)。
*/
private String callbackPath = "/oapi/notice/flow/callback";
private String callbackPath = "/oapi/flow/callback";
/**
* 本服务部署 context-path(可选,无则空):注册时随 basePath 一并申报给 flow-center,