Eureka Server中没有实例

问题描述 投票:0回答:1

我无法在Eureka的INSTANCES列表中看到我的微服务。这是application.properties文件,用于:

Eureka服务器:

server.port=8010
spring.application.name=discoveryservice
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.service-url.defaultzone=http://localhost:8010/eureka/

尤里卡客户:

server.port=8080
spring.application.name=myservice
eureka.client.service-url.defaultzone=http://localhost:8010/eureka/
eureka.client.fetch-registry=false
eureka.client.register-with-eureka=false
spring.devtools.restart.enabled=true

我能够看到Eureka服务器仪表板。启动微服务时,我无法在Eureka仪表板中看到任何可用实例。在控制台中,我可以看到该服务已注册并成功启动。

[服务已启动并在Eureka中注册:enter image description here

Eureka Server控制台:enter image description here

显示在此链接中的仪表板(http://localhost:8010/)而不是(http://localhost:8010/eureka/)。为什么??enter image description here

所以,我在这里有两个问题。为什么在此http://localhost:8010/中而不是在此http://localhost:8010/eureka中得到eureka仪表板?其次,为什么我的微服务没有出现在INSTANCES上?任何帮助表示赞赏!谢谢。

spring-boot netflix-eureka
1个回答
0
投票

请检查此视频链接。

https://www.youtube.com/watch?v=jhvJg4tDrpw&list=PLqq-6Pq4lTTZSKAFG6aCDVDP86Qx4lNas&index=20

此外,您应该一次检查pom.xml,并查看“ Maven依赖项”中是否存在相应的jar。您可以在以下链接中使用pom.xml:https://github.com/koushikkothagal/spring-boot-microservices-workshop/blob/master/movie-info-service/pom.xml

© www.soinside.com 2019 - 2024. All rights reserved.