Spring:将Eureka服务显示为向下而不是删除

时间:2018-03-05 12:14:08

标签: spring yaml netflix-eureka

我有Eureka Server并拥有众多客户。现在,无论何时注册任何服务,它都会显示在Eureka Page上。当我现在杀死一个特定的服务时,我仍想在状态为down的页面上显示它。但在我的情况下发生的事情是特定实例不会显示。任何人都可以帮忙。

服务器 - Yml

spring:
  application:
    name: eureka

server:
  port: 4544
  context-path: /eureka

eureka:
  server:
    enableSelfPreservation: false
    eviction-interval-timer-in-ms: 1000
  client:
    registerWithEureka: false
    fetchRegistry: false
    serviceUrl:
      defaultZone: http://localhost:4544/eureka/
  instance:
    hostname: localhost
    homePageUrlPath: /eureka/

management:
  security:
    enabled: false

客户 - YML

spring:
  application:
    name: myclient

server:
  port: 3333
  context-path: /myclient

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    healthcheck:
      enabled: true
    lease:
      duration: 5
    serviceUrl:
      defaultZone: http://localhost:4544/eureka/
  instance:
    leaseRenewalIntervalInSeconds: 1
    leaseExpirationDurationInSeconds: 2
    hostname: localhost
    homePageUrlPath: /myclient/

0 个答案:

没有答案