Is it possible to set a session attribute in a manager class (class which is not a controller and is marked as @component)? The scenario is like this, from my Controller i'm calling a manag开发者_高级运维er class which does some logic. I want to store the result of this logic in the session, so that i can use it in the later requests.
No. @SessionAttribute
is a controller-specific concept. To get similar behaviour in other components you can use session-scoped beans.
精彩评论