Files
hospital-front/pac/conf-example/agent.properties
T
lianlonggangandClaude 535162e63a feat: Kotlin+Solon 重构医院前置机(业务+被控端+Agent+升级流程)
主程序(com.hospital.front):
- Kotlin 2.0.21 + Solon 3.10.7 + MyBatis-Plus + HikariCP + Logback
- HospitalAdapter 策略模式:5 家医院(xinglongyuan/qingyang/ningxia/yanan/jinghe)+ dev Mock
- 三方言 Mapper:bsm(Oracle)/ nx / ya(SqlServer),存储过程参数原样迁移
- 20 个业务接口(/order/*)+ 11 个被控端接口(/api/admin/*,Token 鉴权+脱敏+防穿越)
- 全局异常处理、Result 统一响应、业务开关热更新

Agent(com.hospital.agent,独立进程,单 jar 双 main):
- WebSocket 主动出站连 B 端(指数退避重连),心跳转发主程序健康
- ProcessGuard 看门狗:3 次探测失败自动拉起主程序
- UpgradeCommand:下载→SHA256 校验→备份→替换→拉起→健康检查→失败自动回滚
- 命令分发:PING/日志/配置/重启等 10 类命令

部署(pac/):
- Windows Server 脚本(start.bat/agent.bat/WinSW 服务),纯 ASCII 注释防 GBK 错乱
- 5 家医院配置模板 + agent.properties

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-21 12:35:05 +08:00

29 lines
971 B
Properties
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.
# ====================================
# Agent 配置(部署时拷贝到 D:\hospital-front\conf\agent.properties
# Agent 启动命令:javaw -cp bin\hospital-front.jar com.hospital.agent.AgentMainKt
# 环境变量可覆盖:AGENT_ 前缀 + 大写 + 下划线(如 AGENT_SERVER_URL
# ====================================
# B 端管理服务器 WebSocket 地址
server.url=ws://127.0.0.1:9091/ws
# 设备编号(每台前置机唯一,建议按医院+序号命名)
device.id=jinghe-01
# 设备鉴权 Token(与 B 端注册信息一致)
device.token=
# 主程序健康检查地址
main.health.url=http://127.0.0.1:8082/api/admin/health
# 主程序管理接口 Token(与主程序 app.yml 的 admin.token 一致)
main.admin.token=
# 主程序启动命令(宕机拉起用;Windows 用 .batLinux 用 .sh
main.start.cmd=bin/start.bat
# 心跳间隔(秒)
heartbeat.sec=30
# 是否守护主程序(宕机自动拉起)
guard.enable=true