2016-07-27 92 views
0

我正在扩展使用Spring Webflow 2.4.1和Spring 4.1.8构建的应用程序(Jasig CAS)。我注意到,当我离开一段时间回来时,流程将继续执行。它不超时。春季webflow不闲置超时?它恢复?

我认为,空闲超时后,流程将使用户回到起点,因为会话被销毁,流程执行键将会丢失,并且HTTP会话中存储的变量也会丢失。但是,显然情况并非如此。

有人可以帮我理解为什么流量不会超时?而且,在HTTP会话被销毁之后,它是如何获得流程执行键和流变量的呢?

这是我看到的日志。请注意,流程正在恢复并且流量变量已恢复,这可能是为什么流量可以继续运行。

2016-07-26 16:10:17,688 DEBUG [org.springframework.webflow.mvc.servlet.FlowHandlerMapping] - Mapping request with URI '/cas/login' to flow with id 'login' 
2016-07-26 16:10:17,689 DEBUG [org.springframework.webflow.executor.FlowExecutorImpl] - Resuming flow execution with key 'c5317d47-5330-4189-971f-......(key omitted) 
2016-07-26 16:10:17,710 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - Getting FlowDefinition with id 'login' 
2016-07-26 16:10:17,710 DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - Resuming in [email protected]149 
2016-07-26 16:10:17,710 DEBUG [org.springframework.webflow.engine.Flow] - Restoring [[email protected] name = 'credential', valueFactory = [[email protected] type = UsernamePasswordCredential]] 
2016-07-26 16:10:17,711 DEBUG [org.springframework.webflow.engine.Flow] - Restoring [[email protected] name = 'changePassword', valueFactory = [[email protected] type = ChangePasswordCredential]] 
2016-07-26 16:10:17,711 DEBUG [org.springframework.webflow.engine.Flow] - Restoring [[email protected]d name = 'changeEmail', valueFactory = [[email protected] type = ChangeEmailAddress]] 
2016-07-26 16:10:17,711 DEBUG [org.springframework.webflow.engine.Flow] - Restoring [[email protected] name = 'changeSecretQuestion', valueFactory = [[email protected] type = ChangeSecretQuestion]] 
2016-07-26 16:10:17,712 DEBUG [org.springframework.webflow.mvc.view.AbstractMvcView] - Processing user event 'submit' 

回答

1

要么你的会话没有被实际销毁,要么这个Jasig CAS做了一些非默认的事情,以便让Flow持续超越HTTP会话。 Spring Web Flow默认会使用会话,并且一旦会话过期将不能恢复。