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

41 lines
1.9 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 路由——代理按 bizType 查基址表拼绝对 jumpUrl。
*/
@Data
@Component
@ConfigurationProperties(prefix = "userhome.msgcenter")
public class MsgCenterProperties {
/** UserMsg 服务基址;空 = 未接入(代理降级返回空,前端铃铛维持原表现) */
private String usermsgBaseUrl = "";
/**
* 浏览器可达的 UserMsg WS 端点(实时推送握手地址);空 = 不下发 WS 地址,
* 前端维持"打开页面拉一次 + 操作后手动刷新"的既有表现。
* 生产经网关暴露,如 wss://msg.yunhaixingtong.com/usermsg/ws/msg。
*/
private String usermsgWsUrl = "";
/** appKey → 应用显示名(消息行/弹层标签补全,如 100617 → 通知公告);未配置回退 msgType 文案 */
private Map<String, String> appNames = new LinkedHashMap<>();
/**
* 基址表:key 兼容两种查询维度——「页面归属应用」(jumpApp,发送方代发时声明,优先)与
* 「bizType」(发送方自己的消息分类,回落)。业务方应用名键(如 notice)与其主 bizType 键
* 通常重合;细分分类(notice.expedite)由发送方配 jumpApp=notice 命中应用键,无需逐分类配键。
* jumpUrl = 基址 + "/#" + jumpPath;生产同主域用相对段如 /flow-center。
*/
private Map<String, String> jumpBases = new LinkedHashMap<>();
}