spring-cloud-gateway タイムアウト構成
- 接続がタイムアウトしました
- 読み取りタイムアウト
グローバルタイムアウト設定
# 单位毫秒
server:
port: 8080
spring:
application:
name: api-gateway
cloud:
gateway:
httpclient:
# 连接超时
connect-timeout: 5000
# 读取超时
response-timeout: 15000
個別のインターフェースのタイムアウト設定
# 单位毫秒
server:
port: 8080
spring:
application:
name: api-gateway
cloud:
gateway:
routes:
- id: demo
uri: lb://demo
predicates:
- Path=/demo/**
metadata:
# 读取超时
response-timeout: 5000
# 连接超时
connect-timeout: 30000