This article excerpt, reproduced need to indicate the source of http://blog.csdn.net/shadowsick/article/details/8868863
When we customize the filter chain of spring security3, we find that the page permission control label <sec: authorize and other items are no longer valid, because we lack a required instance.
You can find the source code and see that you need a defaultwebinvocationprivilegeevaluator decision maker instance. Configure an instance directly and inject it into the filtersecurityinterceptor instance.
<! -- Page tag permission function dependency --> <bean id = "webinvocationfilter" class = "org. springframework. security. web. access. defaultwebinvocationprivilegeevaluator "> <constructor-Arg ref =" filtersecurityinterceptor "/> </bean>
In this way, we can continue to use the security tag on the page.
<% @ Page Language = "Java" pageencoding = "UTF-8" %> <% @ taglib prefix = 'sec 'uri = 'HTTP: // www.springframework.org/security/tags' %> <% string Path = request. getcontextpath (); string basepath = request. getscheme () + ": //" + request. getservername () + ":" + request. getserverport () + path + "/"; %> <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"> <HTML>