FlowScope 在页面刷新时变得清晰
FlowScope get clear on page refresh
根据我的应用程序要求,我必须为登录过程声明一些变量(例如,登录尝试失败)。
因此,使用
context.getFlowScope().put("count", ++count);
似乎是解决方案。但是在刷新页面后,使用 F5 或什至在更糟糕的情况下使用 ctrl+F5,变量会重置并绑定到 null。
那么,我应该怎么做才能让每个请求都具有一致的请求绑定属性。
请注意,我被迫使用
org.springframework.webflow.execution.RequestContext
提前致谢。
改为将计数变量放入会话中。看下面的例子
Spring webflow - how to pass the session in evaluate expression?
根据我的应用程序要求,我必须为登录过程声明一些变量(例如,登录尝试失败)。
因此,使用
context.getFlowScope().put("count", ++count);
似乎是解决方案。但是在刷新页面后,使用 F5 或什至在更糟糕的情况下使用 ctrl+F5,变量会重置并绑定到 null。
那么,我应该怎么做才能让每个请求都具有一致的请求绑定属性。
请注意,我被迫使用
org.springframework.webflow.execution.RequestContext
提前致谢。
改为将计数变量放入会话中。看下面的例子
Spring webflow - how to pass the session in evaluate expression?