for /f %a in ('jps ^| findstr jar') do taskkill /f /pid %a
java -jar web-admin-0.0.1-SNAPSHOT.jar
F:
cd F:\java project\spring-boot\web-admin
mvn clean package &&
for /f "tokens=5" %a in ('netstat -ano^|findstr "\[::]:8899"') do taskkill /f /pid %a
# 启用变量延迟,否则无法无法在for循环中赋值
setlocal enabledelayedexpansion
cd target
for /f "tokens=4" %b in ('dir^|findstr "web-admin-0.0.1-SNAPSHOT.jar$"') do set jar=%b
java -jar %b
windows重启springboot
于 2022-03-03 00:14:54 首次发布