广州市综治平台后端
xusd
9 days ago 0036fe63364fb92ffc0255e38f38a3af5c6b7f6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#server配置
server:
  port: 9001
 
#spring配置
spring:
  application:
    name: dyh-eureka
  datasource:
    druid:
      stat-view-servlet:
        enabled: false
 
#注册中心配置
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:9001/eureka #集群部署,互相注册
    register-with-eureka: false #是否注册到注册中心 单点部署设置false 集群部署设置true
    fetch-registry: false #是否从注册中心拉取注册服务列表 单点部署设置false 集群部署设置true
  server:
    enable-self-preservation: false #自我保护模式,打开坑比好处多,所以先关闭它
    eviction-interval-timer-in-ms: 5000 #主动清理无效节点的时间间隔 默认60000毫秒,即60秒
    renewal-threshold-update-interval-ms: 120000 #心跳阈值计算周期,单位毫秒,默认为15分钟,如果开启自我保护模式,可以改一下这个配置
    peer-node-read-timeout-ms: 500 #读取对等节点服务器复制的超时的时间,单位毫秒,默认为200
    useReadOnlyResponseCache: false  #禁用readOnlyCacheMap
  instance:
    prefer-ip-address: true
    instance-id: ${spring.cloud.client.ip-address}:${server.port}
    #hostname: localhost
    lease-renewal-interval-in-seconds: 5 # 心跳间隔时间(默认是30秒)
    lease-expiration-duration-in-seconds: 15 # 没有心跳的淘汰时间间隔(默认是90秒)
    status-page-url-path: /actuator/info #eureka注册中心的url link
    health-check-url-path: /actuator/health #健康检查的url