Project Description: Springboot+shiro+maven
Business requirements: Intercept all non-login hotlinking URLs, in addition to questionnaires, can be filled and submitted to any user unexpected.
The problem recurs: I find it strange to return a 302 status code during form submission. After searching the Internet, 302 represents redirection.
I am puzzled: I visit the login can be, why submitted to save the questionnaire will be reported 302 error.
Troubleshooting: First from the AJAX request before the Console.log, and then break the point on the Controll method, found that completely can not break the breakpoint, directly reported 302 error.
Finally think of the project with Shiro Management Authority, all the URL requests are intercepted, so unable to submit the report.
Finally, the request URL is added to Shiro, which is resolved.
After stepping over the pit, after encountering 302 errors, I will first think of whether the URL was intercepted. This can also speed up troubleshooting.
Step pit--http Return code of 302 status code