SSM project interceptor infinite loop error [How to Solve]

Question:

In the SSM project, the implementation of non login interception has been endless loop and does not jump to the page

Solution:

Page not intercepted is not configured in the configuration file, resulting in an infinite loop

<!-- Configure interceptors -->
    <mvc:interceptors>
        <mvc:interceptor>
            <! -- Intercept all pages under the directory -->
            <mvc:mapping path="/**"/>
            <! -- mvc:exclude-mapping is another kind of interception that allows you to unintercept a page in your later tests, so that you don't have to use it in the
                LoginInterceptor's preHandler method inside to get the unintercepted request uri address (preferred)-->
            <mvc:exclude-mapping path="/login.html" />
            <bean class="org.westos.interceptor.LoginInterceptor"></bean>
        </mvc:interceptor>
    </mvc:interceptors>

Because a page may consist of multiple pages and JS, it must be intercepted correctly

Read More: