add 项目运行截图

This commit is contained in:
王鹏
2026-04-10 14:37:23 +08:00
parent a2f5875d1b
commit ef8237d8d1
15 changed files with 2943 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
:: 强制切换到脚本所在目录解决管理员模式启动默认在System32的问题
cd /d "%~dp0"
echo 正确盘符: %~d0
echo 正确路径: %cd%
:: 使用/d参数强制切换驱动器+目录
cd /d "D:\code\server" 2>nul
if %errorlevel% neq 0 (
echo [ERROR] Can not enter D:\code\server
echo 请检查:
echo 1. D盘是否存在
echo 2. code目录是否存在
echo 3. 是否有权限访问
exit /b
)
echo 扫描子目录中...
dir /ad /b
set "first_dir="
for /f "delims=" %%d in ('dir /ad /b 2^>nul') do (
set "first_dir=%%d"
goto :dir_found
)
:dir_found
if not defined first_dir (
echo [ERROR] No subdirectory found
exit /b
)
echo 进入子目录: !first_dir!
cd /d "!first_dir!"
echo 当前路径: %cd%
if not exist "target\" (
echo 执行Maven构建...
call mvn clean package
) else (
pause
echo 检测到 target 目录跳过Maven构建。
)