What is the @DefaultExecutor annotation referred to in the Async Data Fetching section of the docs?
#540
-
|
Specifically here: https://netflix.github.io/dgs/data-loaders/#using-spring-features-such-as-securitycontextholder-inside-a-completablefuture For context, I've run into the mentioned issue where I'm trying to access some thread local data (specifically the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
@arichardson175 , you are right. The Spring SecurityIn Spring Security you will have to leverage the Spring Web MVC |
Beta Was this translation helpful? Give feedback.
@arichardson175 , you are right. The
@DefaultExecutorannotation is an internal construct and we should remove it from the docs. You will have to build an executor that is able to set, and re-set, theRequestAttributesavailable in the context of each thread. This is not a unique problem of theRequestAttributesbut any context dependent construct, such as theSecurityContextas well.Spring Security
In Spring Security you will have to leverage the
DelegatingSecurityContextAsyncTaskExecutor.Spring Web MVC