我正在使用 WebFlow,并希望将当前区域设置添加到流程中。 我已经有一个使用此签名执行此操作的resolveLocale 方法:
public Locale resolveLocale (HttpServletRequest request);
我想在我的 WebFlow XML 中添加类似的内容:
<on-start>
<evaluate expression="localeService.resolveLocale(???)" result="flowScope.locale"/>
</on-start>
现在,我不知道该放什么???参数部分。
有任何想法吗?感谢您的阅读。
最佳答案
我没有使用过 Web Flow,但假设它与 Spring 的其余部分类似,您可以使用 RequestContextHolder 来实现此目的。快速 Google 搜索表明 Web Flow 甚至为您提供 web flow specific RequestContextHolder - 甚至更好
关于java - 访问 Spring WebFlow 中的 HttpServletRequest 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1972385/