org.springframework.web.context.request.RequestContextHolder
org.springframework.web.context.request.RequestAttributes
org.springframework.web.context.request.ServletRequestAttributes

 

开启新线程之前,添加代码:

// 将RequestAttributes对象设置为子线程共享
ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
RequestContextHolder.setRequestAttributes(sra, true);

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-15
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
相关资源
相似解决方案