Files
UserhomeService/src/main/java/com/yunhai/userhome/config/MsgCenterProperties.java
T

40 lines
1.7 KiB
Java
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.
package com.yunhai.userhome.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 消息中心代理配置(§3.5 最小消息接入,修 BP-R3-1 审批人待办断头路):
* UserHome 经签名代理调 UserMsg /oapi/msg/**(appKey=本应用 100001,UserMsg trusted-apps 已含),
* jumpPath 是裸相对路径且各应用落地页均为 hash 路由——代理按应用注册表(UserBase by-code/by-key
* 取 pc_url)拼绝对 jumpUrl;手工基址表 jump-bases 已退役(C2)。
*/
@Data
@Component
@ConfigurationProperties(prefix = "userhome.msgcenter")
public class MsgCenterProperties {
/** UserMsg 服务基址;空 = 未接入(代理降级返回空,前端铃铛维持原表现) */
private String usermsgBaseUrl = "";
/**
* flow-center 服务基址(卡片直批 B3 出站,/oapi/flow/**);空 = 走服务目录
* flow-center(PlatformService 枚举兜底,key 与部署名对齐)。不可达时直批降级提示,不阻塞消息卡片。
*/
private String flowCenterBaseUrl = "";
/**
* 浏览器可达的 UserMsg WS 端点(实时推送握手地址);空 = 不下发 WS 地址,
* 前端维持"打开页面拉一次 + 操作后手动刷新"的既有表现。
* 生产经网关暴露,如 wss://msg.yunhaixingtong.com/usermsg/ws/msg。
*/
private String usermsgWsUrl = "";
/** appKey → 应用显示名(消息行/弹层标签补全,如 100617 → 通知公告);未配置回退 msgType 文案 */
private Map<String, String> appNames = new LinkedHashMap<>();
}