title: Spring Boot POST request with missing request body?
body: <p>I have a very simple HTML form page (which is a part of Spring Boot web application in src/main/resources/public/web.html) to post a String from a textarea to a Spring Boot web application version 1.5.2.</p>
  
  <pre><code>&lt;form action="" method="post"&gt;
  &lt;textarea cols="128" rows="40" name="query"&gt;&lt;/textarea&gt;
  &lt;input value="Send" type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And the SpringBoot class to handle the POST request:</p>
  
  <pre><code>@RestController
  public class QueryController {
      @RequestMapping(value = "/handle", method = RequestMethod.POST)
      protected void handlePost(@RequestBody String postBody) throws Exception {
         // Get query from postBody here
      }
  }
  </code></pre>
  
  <p>It works with small String from textarea in client. However, when the String is big (e.g: with HTTP request header: Content-Length:3789333 (3 MB)). Spring Boot throws an exception like this:</p>
  
  <pre><code>org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: protected void QueryController.handlePost(java.lang.String) throws java.lang.Exception
  at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:154)
  at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:128)
  at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
  </code></pre>
  
  <p>I'm not sure what causes this problem, I'm running the web application with embedded Tomcat from Spring Boot.</p>