我正在尝试获取使用spring安全性创建的会话的信息。我想把它放在一个春天的网络流中。我试过这个:
<evaluate expression="SecurityContextHolder.getContext().getAuthentication().getPrincipal()" result="flowScope.information"/>
但它不起作用。。。
感谢
使用特殊EL变量currentUser
访问Authentication对象:
http://static.springsource.org/spring-webflow/docs/current/reference/htmlsingle/spring-webflow-reference.html#el-可变电流用户