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:
@@ -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) {
|
||||
@@ -28,8 +28,8 @@ public class SampleApplication {
|
||||
}
|
||||
|
||||
@Bean
|
||||
ReactorContextWebFilter reactorContextWebFilter() {
|
||||
return new ReactorContextWebFilter();
|
||||
ContextWebFilter reactorContextWebFilter() {
|
||||
return new ContextWebFilter();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user