添加健康检查接口

- 新增 /health 健康检查端点,返回服务状态信息
- 新增 /health/ping 简单检查端点,返回 pong 响应
- 配置 Spring Security 允许健康检查端点无需认证访问
- 支持负载均衡器和监控系统进行服务可用性检查
This commit is contained in:
irving
2025-08-30 15:03:56 -04:00
parent f4c412be9d
commit fd514edf60
3 changed files with 69 additions and 0 deletions

18
fetch-log.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# 拉取日志脚本
set -e
# 获取当前时间并格式化为指定格式
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "开始拉取日志,当前时间是:$current_time"
# 创建本地log目录如果不存在
mkdir -p ./log
# 从远程服务器拉取整个log文件夹
echo "正在从远程服务器拉取日志文件..."
scp -r root@122.51.20.105:/www/wwwroot/july.hucs.top/log/* ./log/
# 获取当前时间并格式化为指定格式
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "日志拉取完成,当前时间是:$current_time"