server:
port: 10010
spring:
application:
name: api-gateway
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:10086/eureka
zuul:
prefix: /api # 添加路由前缀
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMillisecond: 5000 # 熔断超时时长:10000ms
ribbon:
ConnectTimeout: 1000 # 连接超时时间(ms)
ReadTimeout: 3500 # 通信超时时间(ms)
MaxAutoRetries: 0 # 同一实例的重试次数
MaxAutoRetriesNextServer: 0 # 同一服务不同实例的重试次数
SpringCloud中Zuul的配置
最新推荐文章于 2024-03-26 20:50:10 发布