Spring MVC custom scope bean

前端 未结 3 1752
时光取名叫无心
时光取名叫无心 2020-12-03 02:09

I would like to create my own custom scope bean which will use HTTP session (kind of Flash scope).

According to Spring Manual I need to implement org.springframewor

3条回答
  •  情话喂你
    2020-12-03 02:59

    I recommend to have a look at the source code of org.springframework.web.context.request.SessionScope. This scope must have solved the same problem some how.

    It looks like that they use: RequestContextHolder.currentRequestAttributes().getSessionId()

提交回复
热议问题