springcloud Camden.SR7版本中的zuul 超时时间的配置

编程入门 行业动态 更新时间:2024-10-12 20:22:25

springcloud Camden.SR7<a href=https://www.elefans.com/category/jswz/34/1771446.html style=版本中的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 超时时间的配置

本文发布于:2024-02-11 18:17:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1682533.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   时间   Camden   springcloud   zuul

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!