localhost redirected you too many times (this is the problem encountered in the case of starting to practice the use of filters and doing automatic login)

First use the developer mode to check the request status of the browser page: (Because there are too many requests here, the browser automatically jumps to the error page. Refresh and you can see that a large number of page jump requests are sent.)
Because I am logged in Intercept, and the request displayed in the developer mode happens to be the request that I jumped after intercepting, and since the interception path of my interceptor is path="/**", it can be imagined that all requests intercepted by the interceptor also include my jump Therefore, you only need to open the request interception path in the configuration file.

Solution:
1. Delete the cookie
2. My problem is: the configuration of the filter in the configuration file is: /* all visits are filtered, and there is a page redirection after a successful login in the filter code, and page redirection Is also filtered, so there will be an endless loop

When using filtering, pay attention to whether your jump page is in the filtering range. If the jump page will be filtered by the current filter, an infinite loop will occur.

Guess you like

Origin blog.csdn.net/weixin_45567738/article/details/113926440