在代理后面使用spring cli导致“连接被拒绝”错误

时间:2016-06-14 12:40:40

标签: spring proxy spring-boot

我正在努力让春天的cli在我们的公司代理背后运行。我在春季博客中阅读了一些关于如何设置代理并尝试遵循的建议,但到目前为止还没有任何成功。

我尝试了以下

  • 将http.proxyHost,http.proxyPort,http.proxyUser,http.proxyPassword设置为windows env variable
  • 为https设置相应的变量
  • 设置JAVA_OPTS env。带-D ...的变量
  • 通过设置
  • 上的调试验证JAVA_OPTS变量是否正确选取

根据以上设置,启动脚本实际上使用以下命令来运行spring cli

"C:\Program Files\Java\jdk1.8.0_66/bin/java.exe" -Dhttp.proxyHost=http://webproxy.company.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=https://webproxy.company.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=zencv -Dhttp.proxyPassword=dadada -cp "C:\My programs\spring-1.3.5.RELEASE\bin\\..\lib\*" org.springframework.boot.loader.JarLauncher init

我总是得到同样的错误

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/141.101.112.192, start.spring.io/190.93.243.191] failed: Connection refused: conn
ect)

为了验证我是否可以使用上面的代理从命令行访问该站点,我使用了curl和proxy,并且成功了。请帮忙!

0 个答案:

没有答案