开发者

how to get a Spring bean that is local to the current HttpRequest

I would like to be able to create a bean whose scope is limited to the currently serviced HttpRequest.

I considered ThreadLocal but the problem I see is that threads can be reused to service an HttpRequest by the container. I would like to use said bean in a bean that has no conce开发者_运维问答pt of the currently serviced HttpRequest. Any guidance appreciated.


Use can use request-scoped beans: 3.5.4. Request, session, and global session scopes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜