0

我正在尝试使用 QuickStart 在 Azure Spring Cloud 中运行 Spring Boot https://docs.microsoft.com/en-us/azure/spring-cloud/spring-cloud-quickstart?tabs=IntelliJ& ​​pivots=programming-language-java

我下载了带有相关 jar 的 spring starter,但是当它启动时出现一堆错误

Getting all instance registry info from the eureka server
2020-10-08 23:20:47.012 ERROR [,,,] 32573 --- [           main] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
    at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) ~[jersey-client-1.19.1.jar:1.19.1]
    at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.9.25.jar:1.9.25]

如何阻止这种情况发生,有人对 Microsoft Spring Boot 快速入门有好运吗?

4

1 回答 1

1

您是否尝试在本地运行该应用程序?如果是这种情况,则会出现此错误,因为您的开发机器无法访问由 Azure Spring Cloud 托管的 eureka 服务器。请将应用部署到 Azure Spring Cloud。

于 2020-10-14T06:45:02.117 回答