问题
What triggers Spring's Session Bean to exist in the container, and what removes it? Basically, I want to understand the web flow's effect on Session Bean.
回答1:
Session bean is created when you try to access it from view for the first time or you want to access a bean that depends on it. It is stored in HTTP session so it is removed when session expires or is explicitly destroyed - this part is managed by a servlet container rather than spring.
来源:https://stackoverflow.com/questions/5527957/spring-3-5-session-bean-lifecycle