target base-url 由 open_api_target 快照优先解析,无行/禁用行/空白地址行回落 yml yh.gateway.routes;/api/internal/routes/refresh 同时重载两表。
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- =====================================================================
|
||||
-- 开放接口中心 target 地址表(E11,T-D1a)
|
||||
-- 语义:target_code → 提供方 base-url(容器网内直连)。地址解析优先级 DB > yml(yh.gateway.routes);
|
||||
-- DB 无行 / enabled=0 / base_url 空白 三者一律回落 yml,故本表可整表为空、可逐行灰度。
|
||||
-- 写入方:projman Apply 派生(E12)+ 存量回填(E13);网关运行时只读,
|
||||
-- 改行后 POST /api/internal/routes/refresh 重载即生效(不重启)。
|
||||
-- 可重复执行:CREATE TABLE IF NOT EXISTS(不 DROP——生产回填数据不可丢)
|
||||
-- =====================================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS open_api_target (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
target_code VARCHAR(32) NOT NULL COMMENT '目标应用 ctx(剥掉首斜杠,如 userbase/notice/flowcenter)',
|
||||
base_url VARCHAR(256) NOT NULL COMMENT '提供方 base-url(如 http://notice-service:8080,不含路径)',
|
||||
enabled TINYINT NOT NULL DEFAULT 1,
|
||||
gmt_create DATETIME NOT NULL,
|
||||
gmt_modified DATETIME NOT NULL,
|
||||
UNIQUE KEY uk_target (target_code)
|
||||
);
|
||||
Reference in New Issue
Block a user