#server配置 server: port: 9000 #spring配置 spring: #服务名 application: name: dyh-monitor datasource: druid: stat-view-servlet: enabled: false eureka: client: serviceUrl: #注册中心单机 defaultZone: http://localhost:9001/eureka #注册中心集群 #defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka register-with-eureka: true #是否注册到注册中心 fetch-registry: true #是否从注册中心拉取注册服务列表 initial-instance-info-replication-interval-seconds: 2 #首次注册时间 registry-fetch-interval-seconds: 5 #客户端定时刷新本地缓存时间 instance: leaseRenewalIntervalInSeconds: 10 health-check-url-path: /actuator/health metadata-map: startup: ${random.int} #needed to trigger info and endpoint update after restart prefer-ip-address: true instance-id: ${spring.cloud.client.ip-address}:${server.port} lease-renewal-interval-in-seconds: 10 # 设置心跳的时间间隔(默认是30秒) lease-expiration-duration-in-seconds: 15 # 如果现在超过了5秒的间隔(默认是90秒)