ThreadLocal context propagation for DataFetcher's

The WebMvc starter now supports propagation of ThreadLocal values
extracted at the level of the HTTP handler.

Closes gh-53
This commit is contained in:
Rossen Stoyanchev
2021-05-28 16:26:03 +01:00
parent ca18d03244
commit 56917d8d83
26 changed files with 757 additions and 150 deletions

View File

@@ -23,9 +23,9 @@ import org.springframework.web.server.WebFilterChain;
/**
* WebFilter that inserts a key-value pair into the Reactor context which is
* transferred to and accessible to Reactor-based data fetchers.
* transferred to and accessible in Reactor data fetchers.
*/
public class ReactorContextWebFilter implements WebFilter {
public class ContextWebFilter implements WebFilter {
@Override
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {

View File

@@ -28,8 +28,8 @@ public class SampleApplication {
}
@Bean
ReactorContextWebFilter reactorContextWebFilter() {
return new ReactorContextWebFilter();
ContextWebFilter reactorContextWebFilter() {
return new ContextWebFilter();
}
}