上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 31 下一页
摘要: ###1、 SetRequestHeader GatewayFilter SetRequestHeader GatewayFilter设置请求头,会覆盖原来已有的请求头。 spring: cloud: gateway: enabled: true routes: - id: Goods-Server 阅读全文
posted @ 2023-05-06 20:11 shigp1 阅读(162) 评论(0) 推荐(0)
摘要: ###1、RewriteLocationResponseHeader GatewayFilter RewriteLocationResponseHeader GatewayFilter修改Location响应标头的值,通常是为了消除后端特定的详细信息。有stripVersionMode、locati 阅读全文
posted @ 2023-05-06 19:10 shigp1 阅读(335) 评论(0) 推荐(0)
摘要: ####merge @Test public void testMerge() { Flux.merge(Flux.just(1,2,3),Flux.range(5,6)) .subscribe(System.out::println); } merge将多个Flux合并成一个Flux。 @Test 阅读全文
posted @ 2023-05-06 16:59 shigp1 阅读(150) 评论(0) 推荐(0)
摘要: ###一、生成Flux ####range @Test public void testRange() { Flux.range(1,10) .subscribe(System.out::println); } range第一个参数是起始的数字,第二个参数是要生成数字的数量。Flux.range(1 阅读全文
posted @ 2023-05-06 15:34 shigp1 阅读(86) 评论(0) 推荐(0)
摘要: 新建项目,加入依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> <dependency> <g 阅读全文
posted @ 2023-05-06 14:19 shigp1 阅读(265) 评论(0) 推荐(0)
摘要: ###1、RedirectTo GatewayFilter RedirectTo GatewayFilter接受两个参数,状态和url。状态参数应该是一个300系列的重定向HTTP代码,例如301。url参数应该是一个有效的url。这是Location标头的值。对于相对重定向,应该使用uri:no: 阅读全文
posted @ 2023-05-06 13:34 shigp1 阅读(307) 评论(0) 推荐(0)
摘要: ###1、FallbackHeaders GatewayFilter FallbackHeaders允许在触发熔断转发到外部应用程序中的fallbackUri的请求的标头中添加Spring Cloud CircuitBreaker执行异常详细信息。例如: spring: cloud: gateway 阅读全文
posted @ 2023-05-06 11:19 shigp1 阅读(115) 评论(0) 推荐(0)
摘要: ###1、AddRequestHeader GatewayFilter AddRequestHeader GatewayFilter采用名称和值参数。例如: spring: cloud: gateway: enabled: true routes: - id: Goods-Server # 路由 i 阅读全文
posted @ 2023-05-04 20:52 shigp1 阅读(222) 评论(0) 推荐(0)
摘要: ###1、After Route Predicate Factory After路由谓词工厂接受一个参数,一个日期时间(它是一个java ZonedDateTime)。此谓词匹配在指定日期时间之后发生的请求。例如: spring: cloud: gateway: enabled: true rout 阅读全文
posted @ 2023-05-03 20:54 shigp1 阅读(73) 评论(0) 推荐(0)
摘要: ###使用 SpringCloud Gateway是为了取代Zuul而开发出来的新一代网关,采用了响应式编程。 新建Module GatewayServer,添加依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifa 阅读全文
posted @ 2023-05-03 18:42 shigp1 阅读(89) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 31 下一页