peixue-dev/peidu/重启后端服务.bat

30 lines
538 B
Batchfile
Raw Permalink 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 >nul
echo ========================================
echo 重启后端服务
echo ========================================
echo.
cd backend
echo [1/3] 停止当前服务...
echo 请手动停止正在运行的后端服务Ctrl+C 或关闭窗口)
echo.
pause
echo.
echo [2/3] 清理并编译...
call mvn clean package -DskipTests
if errorlevel 1 (
echo 编译失败!
pause
exit /b 1
)
echo.
echo [3/3] 启动服务...
echo 正在启动后端服务...
java -jar target\peidu-backend-1.0.0.jar
pause