开发者社区 问答 正文

spring boot 做定时任务的时候(Scheduled),系统就会报错,N?400报错

spring boot 做定时任务的时候(Scheduled),系统就会报错,No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

展开
收起
爱吃鱼的程序员 2020-06-07 16:51:20 1857 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>请问问题解决了吗。我也遇到了相似的问题</p>
    
    2020-06-07 16:51:39
    赞同 展开评论