Spring Cloud Eureka:改变心跳和发现路径

Spring Cloud Eureka: changing heartbeat and discovery path

我无法想出一个 属性 来从位于 github 的 ConfigBeans 更改 Eureka 服务器的心跳和发现上下文:https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka

我似乎可以在客户端中设置上下文路径,但不能在服务器中设置。例如,客户端配置为:

eureka:
  instance:
    statusPageUrlPath: /admin/info
    healthCheckUrlPath: /admin/health
    homePageUrlPath: /admin/dashboard
  client:
    registerWithEureka: false
    fetchRegistry: false
    eurekaServerUrlContext: /admin
    serviceUrl:
      defaultZone: http://localhost:8761/admin/eureka/
  server:
    waitTimeInMsWhenSyncEmpty: 0
  dashboard:
     path: /admin/dashboard 

EurekaServerConfigBean 中似乎没有任何内容可供我在服务器上修改以将上下文更改为 /admin。当我 运行 我的客户时,我得到:

2015-07-23 12:18:32.069 ERROR 18894 --- [pool-7-thread-1] com.netflix.discovery.DiscoveryClient    : Can't get a response from http://localhost:8761/admin/eureka/apps/
Can't contact any eureka nodes - possibly a security group issue?

所以@spencergibb 让我参与了一项测试,该测试需要在 Eureka 服务器中进行以下配置 application.yml:

server.contextPath: /admin

就是这样。我以为这是一个 eureka.server 设置。