You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
467 B
15 lines
467 B
4 years ago
|
# 超时设置
|
||
|
|
||
|
当微服务处理业务逻辑时间过长,网关会报超时错误,默认等待时间是5秒。
|
||
|
|
||
|
可在网关指定`spring.cloud.gateway.httpclient.response-timeout`参数设置超时时间,单位毫秒
|
||
|
|
||
|
```properties
|
||
|
# 设置响应超时10秒
|
||
|
spring.cloud.gateway.httpclient.response-timeout=10000
|
||
|
```
|
||
|
|
||
|
更多配置参见:`org.springframework.cloud.gateway.config.HttpClientProperties`
|
||
|
|
||
|
测试用例参见:`com.gitee.sop.test.TimeoutTest`
|