Browse Source

[script]bugfix: zh garbled characters appear in window's bat script execution (#89)

tomsun28 3 years ago
parent
commit
2bb8cee087
2 changed files with 6 additions and 14 deletions
  1. 0 2
      script/assembly/server/bin/shutdown.bat
  2. 6 12
      script/assembly/server/bin/startup.bat

+ 0 - 2
script/assembly/server/bin/shutdown.bat

@@ -2,11 +2,9 @@
 @echo off 
 setlocal enabledelayedexpansion
 
-rem 项目名称
 set SERVER_NAME="${project.artifactId}"
 
 
-rem 应用的端口号
 set SERVER_PORT=1157
 
 echo Start shutdown HertzBeat %SERVER_NAME% 

+ 6 - 12
script/assembly/server/bin/startup.bat

@@ -2,25 +2,21 @@
 @echo off 
 setlocal enabledelayedexpansion
 
-rem 项目名称
 set SERVER_NAME=${project.artifactId}
 
-rem jar名称
 set JAR_NAME=${project.build.finalName}.jar
 
-rem 进入bin目录
+rem enter the bin directory
 cd /d %~dp0
-rem 返回到上一级项目根目录路径
+
 cd ..
-rem 打印项目安装根目录绝对路径
+
 set DEPLOY_DIR=%~dp0..
 echo %DEPLOY_DIR%  
-rem 外部配置文件绝对目录,如果是目录需要/结尾,也可以直接指定文件
-rem 如果指定的是目录,spring则会读取目录中的所有配置文件
+
 set CONF_DIR=%DEPLOY_DIR%\config
 echo %CONF_DIR%
 
-rem 应用的端口号
 set SERVER_PORT=1157
 
 for /f "tokens=1-5" %%i in ('netstat -ano^|findstr "0.0.0.0:%SERVER_PORT%"') do (
@@ -29,8 +25,6 @@ for /f "tokens=1-5" %%i in ('netstat -ano^|findstr "0.0.0.0:%SERVER_PORT%"') do
     goto q
 )
 
-
-rem 项目日志输出绝对路径
 set LOGS_DIR=%DEPLOY_DIR%\logs
 
 rem JVM Configuration
@@ -38,9 +32,9 @@ set JAVA_OPTS= -Duser.timezone=Asia/Shanghai
 
 set JAVA_MEM_OPTS= -server -XX:SurvivorRatio=6 -XX:+UseParallelGC
 
-rem 加载外部log文件的配置
+
 set LOGGING_CONFIG=-Dlogging.config=%CONF_DIR%\logback-spring.xml
-rem 注意配置文件目录最后的后缀需为 / 而不是 windows \
+
 set CONFIG_FILES= -Dlogging.path=%LOGS_DIR% %LOGGING_CONFIG% -Dspring.config.location=%CONF_DIR%/
 echo Starting the %SERVER_NAME% ...