title: Spring MVC, Upload file with other fields
body: <p>I'm trying to construct method for uploading file with some other form fields. </p>
  
  <p>This is standard Html form with file and some other fields: </p>
  
  <pre><code>&lt;form action="products" method="post" enctype="multipart/form-data"&gt;
      &lt;input type="file" name="file"&gt;
      &lt;input type="text" name="name"&gt;
      &lt;input type="text" name="email"&gt;
      &lt;input type="submit" value="Upload" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Please note: I want to use standard HTML form, not Spring form tags like <code>&lt;form:form ...&gt;</code> etc </p>
  
  <p>And this is my controller method: </p>
  
  <pre><code>@ResponseBody
  public MyDto createProduct(@RequestBody MyDto dto, @RequestParam MultipartFile file) {
  
  }
  </code></pre>
  
  <p>But I'm getting error: <code>Required request body content is missing</code>. </p>
  
  <p>How should I construct my web method to receive file as well as DTO object as arguments? Also it will be nice if I can have MultipartFile object included into <code>MyDto</code>.</p>