增加 mock 服务启动脚本

This commit is contained in:
Tian jianyong 2025-10-16 15:14:41 +08:00
parent 3030eab81e
commit 4f1d2256f4
3 changed files with 28 additions and 1 deletions

19
deploy/start_mock_services.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# 项目路径
PROJECT_DIR="/Users/tianjianyong/apps/Company/QAUP-Management"
TOOLS_DIR="$PROJECT_DIR/tools"
# 后台启动三个mock脚本
cd $TOOLS_DIR
# 启动机场mock服务
nohup python3 mock_airport.py > logs/airport.log 2>&1 &
# 启动红绿灯mock服务作为TCP服务器
nohup python3 mock_traffic_light.py > logs/traffic.log 2>&1 &
# 启动无人车mock服务
nohup python3 mock_unmanned_vehicle.py > logs/traffic.log 2>&1 &
echo "三个mock服务已启动请检查 logs 目录下的日志文件"

8
deploy/stop_mock_services.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# 停止mock服务
pkill -f mock_airport.py
pkill -f mock_traffic_light.py
pkill -f mock_unmanned_vehicle.py
echo "mock服务已停止"

View File

@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源(支持环境变量)
master:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:qaup}?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
url: jdbc:postgresql://${DB_HOST:10.0.0.58}:${DB_PORT:5432}/${DB_NAME:qaup}?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: ${DB_USERNAME:qaup}
password: ${DB_PASSWORD:qaup123}
# 从库数据源