Reputation: 27455
How to enable the use-expressions
option of the Spring Security configuration in a code based configuration? This option is needed to enable Expression-Based Access Control usage for Thymeleaf.
In the XML configuration it looks like this:
...
<http auto-config="true" use-expressions="true" >
...
</http>
...
Upvotes: 6
Views: 2668
Reputation: 4523
According to this blog post, use-expressions
is set to true when using the Java Configuration.
Comparison to XML Namespace
...
One difference is that Java Configuration uses authorizeUrls
to specify use-expressions="true"
Hope this helps.
Upvotes: 7