peixue-dev/Archive/[一次性]修复专项课程游客模式-2026-02-01.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 >nul
echo ========================================
echo 修复专项课程游客模式访问
echo ========================================
echo.
echo 修复内容:
echo 1. JWT拦截器token验证失败时不抛出异常改为放行
echo 2. 允许游客访问专项课程列表和详情
echo.
echo [1/3] 停止后端服务...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :8089') do (
echo 找到进程 %%a正在终止...
taskkill /F /PID %%a 2>nul
)
timeout /t 2 /nobreak >nul
echo.
echo [2/3] 重新编译后端...
cd /d "%~dp0..\peidu\backend"
call mvn clean compile -DskipTests
if errorlevel 1 (
echo 编译失败!
pause
exit /b 1
)
echo.
echo [3/3] 启动后端服务...
start "Peidu Backend" cmd /k "mvn spring-boot:run"
echo.
echo ========================================
echo 修复完成!
echo 后端服务正在启动中...
echo 请等待约30秒后测试
echo.
echo 测试步骤:
echo 1. 清除小程序缓存(开发者工具 - 清除缓存)
echo 2. 退出登录(如果已登录)
echo 3. 访问专项课程页面
echo 4. 应该能看到课程列表
echo ========================================
echo.
pause