Merge pull request #740 from jifengnan/develop
[ISSUE #696] Nacos-server starts fail in windows
This commit is contained in:
commit
9636e819ff
@ -17,11 +17,12 @@ set "JAVA=%JAVA_HOME%\bin\java.exe"
|
||||
setlocal
|
||||
|
||||
set BASE_DIR=%~dp0
|
||||
set BASE_DIR=%BASE_DIR:~0,-1%
|
||||
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd
|
||||
rem added double quotation marks to avoid the issue caused by the folder names containing spaces.
|
||||
rem removed the last 5 chars(which means \bin\) to get the base DIR.
|
||||
set BASE_DIR="%BASE_DIR:~0,-5%"
|
||||
|
||||
set DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/"
|
||||
set CUSTOM_SEARCH_LOCATIONS=%DEFAULT_SEARCH_LOCATIONS%,file:%BASE_DIR%conf/
|
||||
set CUSTOM_SEARCH_LOCATIONS=%DEFAULT_SEARCH_LOCATIONS%,file:%BASE_DIR%/conf/
|
||||
|
||||
|
||||
|
||||
@ -37,7 +38,7 @@ if not "%2" == "cluster" (
|
||||
set "JAVA_OPT=%JAVA_OPT% -Xbootclasspath/a:%BASE_DIR%\plugins\cmdb"
|
||||
set "JAVA_OPT=%JAVA_OPT% -Dnacos.home=%BASE_DIR%"
|
||||
set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\target\nacos-server.jar"
|
||||
set "JAVA_OPT=%JAVA_OPT% --spring.config.location="%CUSTOM_SEARCH_LOCATIONS%""
|
||||
set "JAVA_OPT=%JAVA_OPT% --logging.config="%BASE_DIR%/conf/nacos-logback.xml""
|
||||
set "JAVA_OPT=%JAVA_OPT% --spring.config.location=%CUSTOM_SEARCH_LOCATIONS%"
|
||||
set "JAVA_OPT=%JAVA_OPT% --logging.config=%BASE_DIR%/conf/nacos-logback.xml"
|
||||
|
||||
call "%JAVA%" %JAVA_OPT% %*
|
||||
|
Loading…
Reference in New Issue
Block a user