RequestBody 和 RequestParam
MIME Type

SpringBoot 里面默认会注册 org.springframework.web.filter.FormContentFilter
这个类的说明为

that parses form data for HTTP PUT, PATCH, and DELETE requests and exposes it as Servlet request parameters. By default the Servlet spec only requires this for HTTP POST.
即支持 PUT、PATCH、DELETE 的方法自动解析 request parameters 的逻辑

默认的 Servlet 规范 只支持 POST 解析 x-www-form-urlencoded
[http-protocol-parameters]( https://jakarta.ee/specifications/servlet/6.0/jakarta-servlet-spec-6.0#http-protocol-parameters

3.1.1. When Parameters Are Available

The following are the conditions that must be met before form data will be populated to the parameter set:
以下是在将表单数据填充到参数集之前必须满足的条件:

  1. The request is an HTTP or HTTPS request.
    请求是 HTTP 或 HTTPS 请求。
  2. The HTTP method is POST.
    HTTP 方法是 POST。
  3. The content type is application/x-www-form-urlencoded.
    内容类型为 application/x-www-form-urlencoded .
  4. The servlet has made an initial call of any of the getParameter family of methods on the request object.
    Servlet 已对请求对象上的任何 getParameter 系列方法进行了初始调用。

If the conditions are not met and the form data is not included in the parameter set, the form data must still be available to the servlet via the request object’s input stream. If the conditions are met, form data will no longer be available for reading directly from the request object’s input stream.
如果不满足条件,并且表单数据未包含在参数集中,则表单数据仍必须通过请求对象的输入流提供给 Servlet。如果满足条件,则表单数据将不再可用于直接从请求对象的输入流中读取。