版本中的zuul 超时时间的配置"/>
springcloud Camden.SR7版本中的zuul 超时时间的配置
以下可以解决springcloud Camden.SR7版本中html页面访问服务的url地址超时的问题
1.找到本地zuul(本地project),找到后进入resource
2.找到配置文件 application.yml
3.配置zuul服务,配置服务、地址、名称等
如下:
zuul:routes:echo:path: /myusers/**serviceId: myusers-servicestripPrefix: true
hystrix:command:myusers-service:execution:isolation:thread:timeoutInMilliseconds: ...
4.配置服务的超时时间
myusers-service:ribbon:ConnectTimeout: 1000 #连接超时时间ReadTimeout: 3000 #读取超时时间 注:一般情况下都是ribbon读取超时 因为ribbon本身默认是5000所以碰到下载文件的时候很容易出现超时问题
上面解释如果觉得不是很清楚,请根据.1.0.M3/single/spring-cloud-netflix.html网站去查询官方api文档
更多推荐
springcloud Camden.SR7版本中的zuul 超时时间的配置
发布评论