-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
I use springboot cli on windows, but my PC is behind a proxy, so that I set JAVA_OPTS before call spring.bat. I need escape "|" for batch file on Windows, you can refer http://www.robvanderwoude.com/escapechars.php or https://stackoverflow.com/questions/25744252/bypassing-non-proxy-hosts-in-java-opts
set JAVA_OPTS="-Dhttp.proxyHost=proxy.company -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=127.0.0.1^|localhost^|10.* -Dhttps.proxyHost=proxy.company -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=127.0.0.1^|localhost^|10.*"
springboot cli fails and the error message is
Using service at https://start.spring.io
Failed to retrieve metadata from service at 'https://start.spring.io' (Connect to start.spring.io:443 [start.spring.io/104.17.47.2, start.spring.io/104.17.46.2] failed: Connection timed out: connect)
I find the fix by change the line of spring.bat, use quote to surrender %JAVA_OPTS%. Now it works
"%JAVA_EXE%" %JAVA_OPTS% -cp "%CLASSPATH%" org.springframework.boot.loader.JarLauncher %CMD_LINE_ARGS%
to
"%JAVA_EXE%" "%JAVA_OPTS%" -cp "%CLASSPATH%" org.springframework.boot.loader.JarLauncher %CMD_LINE_ARGS%
The linux cli has no such issue.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another