Commit 0fea4b3f authored by wanghao's avatar wanghao

1调整打包方式

parent 203a5ee0
......@@ -7,15 +7,31 @@ setlocal
set "APP_HOME=%~dp0.."
set "APP_NAME=zhmes-agecal-3.5.0.jar"
set "JAVA_OPTS=-Xms1024m -Xmx2048m -Dfile.encoding=UTF-8"
set "SPRING_OPTS=--spring.config.location=../conf/application.yml"
set "CONFIG_LOCATION=%APP_HOME%/conf/"
echo Starting %APP_NAME% ...
echo JAVA_OPTS: %JAVA_OPTS%
echo SPRING_OPTS: %SPRING_OPTS%
echo CONFIG_LOCATION: %CONFIG_LOCATION%
cd /d "%APP_HOME%"
java %JAVA_OPTS% -jar "lib/%APP_NAME%" %SPRING_OPTS%
echo Checking configuration files...
if exist "%CONFIG_LOCATION%application.yml" (
echo Found: application.yml
) else (
echo ERROR: application.yml not found!
pause
exit /b 1
)
if exist "%CONFIG_LOCATION%application-test.yml" (
echo Found: application-test.yml
) else (
echo WARNING: application-test.yml not found
)
echo Starting application with test profile...
java %JAVA_OPTS% -jar "lib/%APP_NAME%" --spring.config.location=file:%CONFIG_LOCATION% --spring.profiles.active=test
if %ERRORLEVEL% NEQ 0 (
echo Failed to start %APP_NAME%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment