Using a request scoped bean outside of an actual web request

前端 未结 5 811
我在风中等你
我在风中等你 2020-12-09 15:39

I have a web application that has a Spring Integration logic running with it in a separated thread. The problem is that at some point my Spring Integration logic tries to us

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 16:12

    You can only use request (and session) -scoped beans on the web container thread on which the request is running.

    I presume that thread is waiting for an async reply from your SI flow?

    If so, you can bind the request-scoped bean to the message, perhaps in a header, or somewhere in the payload.

提交回复
热议问题