title: Spring MVC form parameters and query parameters
body: <p>In Spring 4 MVC, I'm trying to figure out how to accept both form parameters and query parameters posted to my rest endpoint and also trigger validation, but am struggling to figure out how to get this to work.</p>
  
  <p>Ideally, my controller would look something like this:</p>
  
  <pre><code>@RequestMapping(value="/someurl", method=RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
  public someMethod(@Valid @ModelAttribute Order order, @RequestParam String parm1, @RequestParam String parm2) {
  
  }
  </code></pre>
  
  <p>I need to post the form parameters to the controller URL along with some query parameters and a Content-Type = application/x-www-form-urlencoded</p>
  
  <p>Any ideas on how to get this to work?</p>