属性提供了一种将信息传递给过滤器的便捷方法
chain,但它们只影响当前请求。如果要传递
传播到嵌套的其他请求,例如 via ,或在 之后执行,
例如,通过 ,则需要使用 Reactor 。flatMapconcatMapContext
Reactor 需要在 Reactive 链的末尾填充,以便
应用于所有操作。例如:Context
- 
Java
 
WebClient client = WebClient.builder()
		.filter((request, next) ->
				Mono.deferContextual(contextView -> {
					String value = contextView.get("foo");
					// ...
				}))
		.build();
client.get().uri("https://example.org/")
		.retrieve()
		.bodyToMono(String.class)
		.flatMap(body -> {
				// perform nested request (context propagates automatically)...
		})
		.contextWrite(context -> context.put("foo", ...));