I asynchronously invoke method with Spring, using @Async.This method invokes other method annotated with @PreAuthorize, Spring Security Annotation. To make authorization wor
Using the information from Ralph and Oak -
If you want to get @Async working with the standard task executor tag, you would set up your Spring XML config like this
Then in your @Async method, you would specify the pool you want to use
@Async("importPool")
public void run(ImportJob import) {
...
}
That should work so when whenever you call your @Async method, the threadpool thread will use the same security context as the calling thread