Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Spring Security,它说将过滤器映射到 /***。但是我已经有一个映射到 /* 的过滤器,它是 Tuckee URLRewrite 过滤器。
是否可以将两个过滤器映射到同一个东西,还有没有办法指定过滤器被调用的顺序?
是的你可以:
servlet 2.5 xsd:
调用过滤器的顺序是匹配 servlet 的请求 URI 的过滤器映射声明出现在过滤器映射元素列表中的顺序
即它取决于你的<filter-mapping>元素在web.xml
<filter-mapping>
web.xml