application.yaml 1.1 KB
Newer Older
Q
qinyingjie 已提交
1 2 3 4 5 6 7 8
#端口号
server:
  port: 8888

spring:
  application:
    name: zuul-service #服务名称

Q
qinyingjie 已提交
9 10 11 12 13
#路由规则:
zuul:
  sensitiveHeaders: Cookie,Set-Cookie,Authorization
  routes:
    api-portal:
Q
qinyingjie 已提交
14
      path: /portal-service/**  #访问路径:http:/localhost:8888/portal-service/portal/1
Q
qinyingjie 已提交
15 16 17 18
      serviceId: portal-service
    api-goods:
      path: /goods-service/**
      serviceld: goods-service
Q
qinyingjie 已提交
19 20 21 22 23 24 25
      url: http://localhost:9100/,http://localhost:9200/,http://localhost:9300/
  retryable: true
  semaphore:
    max-semaphores: 100
  ribbon-isolation-strategy: thread
#  prefix: /api
  strip-prefix: false
Q
qinyingjie 已提交
26

Q
qinyingjie 已提交
27 28 29 30
#服务提供者
eureka:
  client:
    service-url:
Q
qinyingjie 已提交
31 32 33 34 35 36 37 38
      defaultZone: http://eureka8767:8767/eureka/,http://eureka8768:8768/eureka/,http://eureka8769:8769/eureka/


ribbon:
  ConnectTimeout: 250 #连接超时时间(ms),默认值为250ms
  ReadTimeout: 2000 #通信超时时间(ms),默认值为2000ms
  MaxAutoRetriesNextServer: 0 #对同一服务不同实例重试次数(同一服务下集群个数的重试次数)
  MaxAutoRetries: 2 #对同一实例重试的次数(单个集群节点服务重试的次数)