Spring MVC gets GET/POST request parameters from interceptor or filter request

  1. You can refer to this article to get Content-Type: application/jsonthe JSON request parameters in GET and POST :
    Get the parameters in the request post request in the spring boot interceptor

  2. When the Content-Type is application/x-www-form-urlencoded, from request.getParameter()and request.getInputstream()acquisition parameters are mutually exclusive solutions: the HttpServletRequest getParameter () loss problems

  3. When the Content-Type is a multipart/form-datafile upload time, if you want to get in the filter parameters, there is a problem is when the request reaches the filter has not been to resolve the Spring, reference solution:
    solve springmvc submit multipart / form-data mode request The problem of not getting parameters in the filter

Guess you like

Origin blog.csdn.net/jiaobuchong/article/details/104665382