This commit is contained in:
CloseIn
2026-05-07 15:54:19 +08:00
commit ac5a30844e
18 changed files with 461 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
Write-Host "===== 开始构建 gmp-mock-service =====" -ForegroundColor Cyan
mvn clean package -DskipTests
if ($LASTEXITCODE -eq 0) {
Write-Host "===== 构建成功 =====" -ForegroundColor Green
$jarPath = "target\gmp-mock-service.jar"
if (Test-Path $jarPath) {
$size = [math]::Round((Get-Item $jarPath).Length / 1MB, 2)
Write-Host "JAR 文件: $jarPath ($size MB)" -ForegroundColor Green
}
} else {
Write-Host "===== 构建失败 =====" -ForegroundColor Red
exit 1
}
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
set -e
echo "===== 开始构建 gmp-mock-service ====="
mvn clean package -DskipTests
if [ $? -eq 0 ]; then
echo "===== 构建成功 ====="
JAR_PATH="target/gmp-mock-service.jar"
if [ -f "$JAR_PATH" ]; then
SIZE=$(du -h "$JAR_PATH" | cut -f1)
echo "JAR 文件: $JAR_PATH ($SIZE)"
fi
else
echo "===== 构建失败 ====="
exit 1
fi
+14
View File
@@ -0,0 +1,14 @@
$jarPath = "target\gmp-mock-service.jar"
if (-not (Test-Path $jarPath)) {
Write-Host "JAR 文件不存在,请先执行 build.ps1 进行构建" -ForegroundColor Red
exit 1
}
$env:JAVA_OPTS = $env:JAVA_OPTS ?? "-Xms256m -Xmx512m"
Write-Host "===== 启动 gmp-mock-service =====" -ForegroundColor Cyan
Write-Host "端口: 8080" -ForegroundColor Cyan
Write-Host "接口: POST http://localhost:8080/api/docx/export" -ForegroundColor Cyan
java $env:JAVA_OPTS -jar $jarPath
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
JAR_PATH="target/gmp-mock-service.jar"
if [ ! -f "$JAR_PATH" ]; then
echo "JAR 文件不存在,请先执行 build.sh 进行构建"
exit 1
fi
JAVA_OPTS="${JAVA_OPTS:--Xms256m -Xmx512m}"
echo "===== 启动 gmp-mock-service ====="
echo "端口: 8080"
echo "接口: POST http://localhost:8080/api/docx/export"
java $JAVA_OPTS -jar "$JAR_PATH"