peixue-dev/Archive/[一次性]重启后端-游客模式修复-2026-02-01.bat

34 lines
935 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 /d "%~dp0..\peidu\backend"
echo [1/3] 停止现有后端服务...
taskkill /F /IM java.exe /FI "WINDOWTITLE eq 后端服务*" 2>nul
timeout /t 2 >nul
echo.
echo [2/3] 清理并重新编译...
call mvn clean package -DskipTests
echo.
echo [3/3] 启动后端服务...
start "后端服务" java -jar target\peidu-backend-1.0.0.jar
echo.
echo ========================================
echo 后端服务已启动
echo.
echo 修复内容:
echo 1. SpecialCourseController - 添加异常处理和日志
echo 2. InterestCourseController - 添加异常处理和日志
echo 3. AssessmentServiceController - 添加异常处理和日志
echo.
echo 现在即使出现异常也会返回空列表不会返回401错误
echo ========================================
pause