Java并行流 No thread-bound request found
生活随笔
收集整理的這篇文章主要介紹了
Java并行流 No thread-bound request found
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
異常如下:
java.lang.IllegalStateException: 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.解決方案:
在web.xml中添加一個監聽
<listener><listener-class>org.springframework.web.context.request.RequestContextListener</listener-class></listener> </web-app> 創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的Java并行流 No thread-bound request found的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决SecureCRT与SecureFX
- 下一篇: Java高级特性——反射