zhibo/rebuild_and_restart_backend.bat

47 lines
1.2 KiB
Batchfile
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.

@echo off
chcp 65001
echo ========================================
echo 重新编译并重启后端服务
echo ========================================
cd /d E:\zhibo_1.0\6.0\zhibo\Zhibo\zhibo-h
echo.
echo [1/3] 停止现有后端进程...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":30001" ^| findstr "LISTENING"') do (
echo 正在停止进程 %%a
taskkill /F /PID %%a 2>nul
)
timeout /t 2 /nobreak >nul
echo.
echo [2/3] 重新编译项目...
call mvn clean package -DskipTests -q
if %errorlevel% neq 0 (
echo 编译失败!
pause
exit /b 1
)
echo 编译成功!
echo.
echo [3/3] 启动后端服务...
cd crmeb-admin
start "CRMEB Admin Backend" java -jar target/crmeb-admin.jar
echo 后端服务已启动请等待约30秒...
echo.
echo ========================================
echo 部署完成!
echo 后端地址: http://localhost:30001
echo 前端地址: http://localhost:9527
echo ========================================
echo.
echo 请在管理后台测试用户活动记录功能:
echo 1. 登录管理后台
echo 2. 进入 用户管理 -^> 用户列表
echo 3. 点击用户121道玄的详情
echo 4. 切换到"关注记录""点赞记录"等标签页
echo.
pause