Browse Source

配置服务

Trick 5 years ago
parent
commit
935481b454
2 changed files with 33 additions and 13 deletions
  1. 20 0
      ag-basic.yml
  2. 13 13
      application.yml

+ 20 - 0
ag-basic.yml

@ -28,10 +28,30 @@ spring:
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false
        isolation:
          thread:
            timeoutInMilliseconds: 240000
#Ribbon
ribbon:
  ReadTimeout: 600000
  ConnectTimeout: 600000
  MaxAutoRetries: 3
  MaxAutoRetriesNextServer: 0
  eureka:
     enabled: true
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
zuul:
  retryable: true
  config-priority: false
  ignored-services: '*'
  sensitive-headers:

+ 13 - 13
application.yml

@ -18,24 +18,24 @@ management:
    enabled: false
#Hystrix
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false
#hystrix:
#  command:
#    default:
#      execution:
#        timeout:
#          enabled: false
#        isolation:
#          thread:
#            timeoutInMilliseconds: 240000
#Ribbon
ribbon:
  ReadTimeout: 600000
  ConnectTimeout: 600000
  MaxAutoRetries: 3
  MaxAutoRetriesNextServer: 0
  eureka:
     enabled: true
#ribbon:
#  ReadTimeout: 600000
#  ConnectTimeout: 600000
#  MaxAutoRetries: 3
#  MaxAutoRetriesNextServer: 0
#  eureka:
#     enabled: true
#Zuul serviceid 模式配置zuulhost 无效.启用ribbon
#zuul: