mercredi 1 novembre 2017

The exclude-mapping of interceptor is not working in spring mvc

I want to make an interceptor that will intercept every request except that related to login. The problem that I have is the interceptor still intercepts the requests that I provided with exclude-mapping. But the exclude-mapping can't working. Here is the configuration,spring 4.3:

<mvc:interceptors>
    <beans:bean class="com.knowledge.filter.GlobalInterceptor" />
    <mvc:interceptor>
        <mvc:mapping path="/back" />
        <mvc:exclude-mapping path="/back/login" />
        <beans:bean class="com.knowledge.filter.LoginInterceptor" />
    </mvc:interceptor>
</mvc:interceptors>

In my opinion, the "/back/login" should not be intercepted. Actually still get into the class of the interceptor.So, do i make some mistakes?




Aucun commentaire:

Enregistrer un commentaire