08ea5fbe98
添加用户管理视图、API和状态管理文件
23 lines
1.1 KiB
Bash
Executable File
23 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
LOG_DIR="$PROJECT_ROOT/test-automation/logs"
|
|
PID_FILE="$LOG_DIR/api-server.pid"
|
|
|
|
mkdir -p "$LOG_DIR"
|
|
|
|
echo "[启动API服务] 正在启动..."
|
|
|
|
cd "$PROJECT_ROOT/everything-is-suitable-api/everything-is-suitable-app"
|
|
|
|
export GATEWAY_PUBLIC_PATHS="/api/client/auth/register,/api/client/auth/login,/api/sys/auth/register,/api/sys/auth/login,/api/sys/auth/refresh,/api/sys/auth/logout,/sys/auth/register,/sys/auth/login,/sys/auth/refresh,/sys/auth/logout,/api/health,/api/swagger-ui,/api/swagger-ui/**,/api/v3/api-docs,/api/v3/api-docs/**,/api/webjars/swagger-ui/**,/api/webjars/**,/api/actuator/**,/api/almanac,/api/almanac/**,/actuator/**,/swagger-ui,/swagger-ui/**,/v3/api-docs,/v3/api-docs/**,/webjars/swagger-ui/**,/webjars/**,/almanac,/almanac/**"
|
|
|
|
nohup mvn spring-boot:run -Dspring-boot.run.profiles=test > "$LOG_DIR/api-server.log" 2>&1 &
|
|
|
|
API_PID=$!
|
|
echo $API_PID > "$PID_FILE"
|
|
|
|
echo "[启动API服务] 服务启动中,PID: $API_PID"
|
|
echo "[启动API服务] 日志文件: $LOG_DIR/api-server.log"
|