【发布时间】:2016-10-18 11:22:30
【问题描述】:
我正在尝试实现 spring 文档中给出的 spring boot webservice 应用程序:
https://spring.io/guides/gs/consuming-web-service/
构建成功,请求和响应 java 文件被创建,但是当执行 spring-boot:run 时,它给出了
Caused by: org.springframework.ws.client.WebServiceIOException: I/O error: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:561)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390)
at hello.WeatherClient.getCityForecastByZip(WeatherClient.java:30)
at hello.Application.main(Application.java:20)
但是可以通过 Eclipse 中的 Web 浏览器访问该 URL。请帮我解决这个问题
【问题讨论】:
-
您是否在通过公司代理访问互联网的公司网络中?您是否设置了访问互联网的代理设置?
标签: spring web-services spring-boot