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
博客主要围绕 Spring Cloud Gateway 超时配置展开,介绍了连接超时、读取超时情况,还详细说明了全局超时配置和个别接口超时配置的相关内容,属于后端开发中 Java 技术的应用。
9229

被折叠的 条评论
为什么被折叠?



