基于XML的Spring Security配置中的use-expressions属性等价于基于代码的配置

如何在基于代码的配置中启用 Spring Security配置的use-expressions选项?需要此选项才能为Thymeleaf启用 Expression-Based Access Control使用.

在XML配置中,它看起来像这样:

...
<http auto-config="true" use-expressions="true" >
   ...   
</http>
...
根据 this博文,使用Java配置时,use-expressions设置为true.
Comparison to XML Namespace
...
One difference is that Java Configuration uses authorizeUrls 
to specify use-expressions="true"

希望这可以帮助.

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念