title: How to get Form data as a Map in Spring MVC controller?
body: <p>I have a complicated html form that dynamically created with java script.</p>
  
  <p>I want to get the map of key-value pairs as a Map in java and store them.</p>
  
  <p>here is my controller to get the submitted data.</p>
  
  <pre><code>@RequestMapping(value="/create", method=RequestMethod.POST, 
      consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
  public String createRole(Hashmap&lt;String, Object) keyVals) {
      ....
  }  
  </code></pre>
  
  <p>but my map is empty.</p>
  
  <p>How can i get form data as a map of name-value pairs in Spring mvc controller?</p>