Spring bean scopes: session and globalSession

前端 未结 2 1820
迷失自我
迷失自我 2021-01-30 16:06

What is the difference between session and globalSession in Spring framework?



        
2条回答
  •  -上瘾入骨i
    2021-01-30 16:38

    As per Spring documentation ::

    session - Scopes a single bean definition to the lifecycle of an HTTP Session. Only valid in the context of a web-aware Spring ApplicationContext.

    global session - Scopes a single bean definition to the lifecycle of a global HTTP Session. Typically only valid when used in a portlet context. Only valid in the context of a web-aware Spring ApplicationContext.

提交回复
热议问题