开发者

Configuring URL patterns for servlet filters

We are trying to use spring security in our application.

IN the below code, How do we configure the URL pattern to say

"intercept all the UR开发者_运维问答Ls except the URLs of pattern '/xyz/' " ?

Basically I want the filter to intercept all the URLs,but if an URL contains /xyz/ , it should not intercept it.

     <sec:filter-chain pattern="/**" filters="httpSessionContextFilter,
                                    filter_A,
                                    filter_B,
                                    exceptionTranslationFilter,
                                    authorizationFilter" />
    </sec:filter-chain-map>


Try:

<intercept-url pattern="*/xyz/*" filters="none" />

filters="none" disables the filter chain for the given URL pattern.

Also I'd recommend enabling the spring debug log if you haven't already. So you can see exactly what's going on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜