feat: 提交流程中心后端代码
build / build-push (push) Successful in 28s

Spring Boot 流程引擎服务:流程定义/实例/任务、审批人解析、
回调分发、oapi 接口及单元测试。
保留远程 .gitea/workflows/build.yml 与 docker/Dockerfile,
新增 .gitignore 排除 target/ 构建产物。
This commit is contained in:
chenxing
2026-09-15 10:42:56 +08:00
parent 0296b2b5dd
commit c1103aeb29
65 changed files with 7119 additions and 0 deletions
+120
View File
@@ -0,0 +1,120 @@
server:
port: 8085
# 本地无 context-path(同 Notice dev / svc-hall dev);生产经 CONTEXT_PATH=/flow-center 注入,
# Caddy 只反代 /flow-center/api/* 与 /flow-center/oapi/*,页面走前端静态
spring:
application:
name: flow-center
datasource:
url: jdbc:mysql://localhost:3306/bsch_flowcenter?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
minimum-idle: 5
maximum-pool-size: 20
jpa:
hibernate:
# 开发期 update 自动建表;生产环境建议 none + 升级脚本(sql/ 目录)
ddl-auto: update
show-sql: false
open-in-view: false
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
properties:
hibernate:
jdbc:
time_zone: Asia/Shanghai
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: Asia/Shanghai
# ===== 基础平台 yh 配置(Cms/Notice/svc-hall 同款三件套)=====
yh:
auth:
enabled: true
sso:
# 本地全链测试:指向 local-debug 的 CAS(8443 根路径,RSA+AJAX 登录页);生产改回 sso.yunhaixingtong.com
server-url-prefix: http://localhost:8443
# 本地 dev 指向后端直连(脚本化登录 service=client-host-url+请求路径);生产改回 http://localhost:8088
client-host-url: http://localhost:8085
allow-headers: all
allow-origins: all
# 用户面与管理面全在 /api/* 下;本应用无匿名面。
# 业务方托管调用走 /oapi/*(appKey 签名,RequireAppSignFilter 强制 401)
url-pattern: /api/*
app-auth:
enabled: true
# 本应用自身身份(客户端签名用)——UserBase 注册后分配(进白名单),占位值上线前必须替换,
# 生产由 projman/Nacos 注入,禁止明文入库仓库(V2.0 R7)。
# 本地占位 appKey=100019(svc-hall=100018 顺延);联调时需在 UserBase(及对端 trusted-apps)侧同步此占位对。
# 注意:占位 secret 必须带引号且含字母——裸 32 个 0 会被 YAML 按八进制整数解析成 "0",SignUtil 校验直接 500
app-key: 100019
app-secret: "flow-center-dev-secret-100019"
# 提供方强制验签(两级模型 §4.1,狗粮迁移 T1.3):本地 OpenApiAuthEnforceConfiguration 副本已删,
# 换此一行——/oapi/** 无签名三件套即 401(starter 版 RequireAppSignFilter,order +11 行为等价)
server:
enforce-patterns: [/oapi/*]
# 中央密钥链(两级模型 §4.2):trusted-apps 先(本地确定性兜底),未命中走 SignKeyResolver
# (Redis sign:app:* → Caffeine → UserBase 兜底端点)——任何在 UserBase 注册过的 appKey 自动可验
trust-registry: true
# 入站验签白名单:svc-hall 办事大厅(appKey=100018)、CMS(appKey=100005)、Notice(appKey=100617,
# 与生产权威 deploy/notice.yaml 一致——本地联调对齐生产号段,D8);
# 开 trust-registry 后此表仍保留为主兜底(Redis 停摆时白名单确定性工作)
trusted-apps:
"100018": "svc-hall-dev-secret-100018"
"100005": "2c7885de594742cc840b8762910b2d2e"
"100617": "2a3b4c5d6e7f8091a2b3c4d5e6f70819"
open:
enabled: true
# 本地全链测试:指向 local-debug 的 UserBase;生产改回 base.yunhaixingtong.com
base-host: http://localhost:8060
base-path: /userbase
app-key: 100019
app-secret: "flow-center-dev-secret-100019"
# ===== 流程中心专属配置 =====
flow-center:
# 提交人本校校验(概览 §5.5):经 UserBase /oapi/user/byId 核验,生产必须 true(fail-closed);
# 本地 UserBase(8060) 已就绪 → true 走真校验
submitter-school-check:
enabled: true
# (原 public-base-url 已删)UserMsg jumpPath 是裸相对路径(/task/{taskId}),落地页基址由
# 消费方(UserHome 消息代理)按 bizType→应用 front 基址拼 "#/..." 承接,本配置在 Java 侧
# 零引用,属死配置(走查报告 BP-R3-1);勿再回加。
# 本地开发跨端口 CORS(V2.0 拍板项#2):svc-hall front(8087)/本应用 front(8088) 直调 /api/flow/*
# 需要带凭据的 CORS 头;同主域生产置空即可关闭
cors:
# 8077 = Notice front dev 端口(T1.4:Notice 详情页直调 /api/flow/* 撤回/催办需带凭据 CORS)
allowed-origins: http://localhost:8087,http://localhost:8088,http://localhost:8077
# 回调推送线程池(概览 §8.4:单机小并发 5)
callback:
push-pool-size: 5
# 退避序列(分钟):1m→5m→30m→2h→6h;越过序列后按 cap-backoff-minutes 封顶持续重试(不自动死信)
retry-backoff-minutes: 1,5,30,120,360
cap-backoff-minutes: 60
hang-alert-retries: 6
# 挂起/死信告警接收人(本校管理员 userId;本地联调可留空)
alert-user-ids: ""
usermsg:
# UserMsg 基址(IDHttp 出站自动签名直达 /oapi/msg/**;UserMsg 侧 trusted-apps 须收本应用占位 appKey=100019)
enabled: true
base-url: http://localhost:8080
logging:
level:
com.yunhai.flowcenter: debug
management:
endpoints:
web:
exposure:
include: health
endpoint:
health:
show-details: never
health:
redis:
# 引 data-redis 仅服务于 trust-registry 密钥链;关健康指标防 Redis 停摆拉 DOWN /actuator/health
# (组合链 trusted-apps 先行兜底,Redis 不可用时验签仍确定性工作)
enabled: false