- 新增 `sample-apps/order-service` Java 样板应用及 Win/Linux 构建、启停、状态脚本 - 新增 `LocalSampleAppService`,在 `software-a` 中支持 `order-service test` 本地桥接部署 - 增加桥接开关配置:`ENABLE_SAMPLE_APP_BRIDGE`、`SAMPLE_APP_ROOT` - 修正后端配置读取方式,环境变量可在运行时生效(`Settings` 改为 `default_factory`) - 更新应用元数据默认验证目标:`127.0.0.1:18080`、本地日志路径 - 新增桥接测试 `test_sample_app_bridge.py`,后端基线更新至 `24 passed` - 更新 `.gitignore`,忽略样板应用 `build/runtime` 产物 - 更新 README 与《当前进度总结》:记录本轮“真实样板应用 + 桥接能力”进展,MVP 进度约 `97%`
43 lines
1.3 KiB
PowerShell
43 lines
1.3 KiB
PowerShell
param(
|
|
[string]$Version = "1.2.3",
|
|
[int]$Port = 18080,
|
|
[string]$JavaHome = $env:JAVA_HOME
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$buildRoot = Join-Path $root "build"
|
|
$jarPath = Join-Path $buildRoot "order-service-demo.jar"
|
|
$runtimeRoot = Join-Path $root "runtime"
|
|
$logsRoot = Join-Path $runtimeRoot "logs"
|
|
$pidFile = Join-Path $runtimeRoot "order-service.pid"
|
|
$logPath = Join-Path $logsRoot "order-service.log"
|
|
|
|
New-Item -ItemType Directory -Path $logsRoot -Force | Out-Null
|
|
|
|
if (-not (Test-Path $jarPath)) {
|
|
& (Join-Path $PSScriptRoot "build.ps1") -JavaHome $JavaHome | Out-Null
|
|
}
|
|
|
|
if (Test-Path $pidFile) {
|
|
try {
|
|
$existingPid = Get-Content -LiteralPath $pidFile | Select-Object -First 1
|
|
if ($existingPid) {
|
|
Stop-Process -Id ([int]$existingPid) -Force -ErrorAction SilentlyContinue
|
|
}
|
|
} catch {}
|
|
}
|
|
|
|
$java = if ($JavaHome) { Join-Path $JavaHome "bin\\java.exe" } else { "java" }
|
|
$arguments = @(
|
|
"-jar", $jarPath,
|
|
"--app-name=order-service",
|
|
"--version=$Version",
|
|
"--port=$Port",
|
|
"--log-path=$logPath"
|
|
)
|
|
|
|
$process = Start-Process -FilePath $java -ArgumentList $arguments -PassThru -WindowStyle Hidden
|
|
Set-Content -LiteralPath $pidFile -Value $process.Id -Encoding ASCII
|
|
Write-Output $process.Id
|