java - Spring @async copy session -


i´m using spring @async make asynchronous request, problem in order request need "authentication" of spring security in securitycontextholder.

in order make works think best option copy session 1 thread other.

try create empty securitycontext thread, set authentication context, set context securitycontextholder newly created context. can run in runnable