Spring SessionStatus object.setComplete()是清除所有会话属性,还是只对使用它的控制器起作用?
如果我在控制器中使用SessionStatus object.setComplete(),我对此不清楚,它是清除Webapp的所有会话数据还是只清除由保存的会话数据 使用@SessionAttributes的特定控制器Spring SessionStatus object.setComplete()是清除所有会话属性,还是只对使用它的控制器起作用?,spring,model-view-controller,Spring,Model View Controller,如果我在控制器中使用SessionStatus object.setComplete(),我对此不清楚,它是清除Webapp的所有会话数据还是只清除由保存的会话数据 使用@SessionAttributes的特定控制器 SessionStatus#setComplete()JavaDoc非常清楚该方法的用途: /** * Mark the current handler's session processing as complete, allowing for * cleanup of s
SessionStatus#setComplete()
JavaDoc非常清楚该方法的用途:
/**
* Mark the current handler's session processing as complete, allowing for
* cleanup of session attributes.
*/
这将清除通过@SessionAttribute
注册的当前处理程序的会话属性。这与servlet的HttpSession#invalidate()
完全不同:
这实际上会完全破坏用户会话。我会将其重新组织为会话状态,与会话状态相同。无效?非常感谢您的回复。
/**
* Invalidates this session then unbinds any objects bound to it.
*/