title: How to pass List<String> in post method using Spring MVC?
body: <p>I need to pass a list of values in the request body of <code>POST</code> method but I get <code>400: Bad Request error</code>.</p>
  
  <p>Below is my sample code:</p>
  
  <pre><code>@RequestMapping(value = "/saveFruits", method = RequestMethod.POST, 
      consumes = "application/json")
  @ResponseBody
  public ResultObject saveFruits(@RequestBody List&lt;String&gt; fruits) {
      ...
  }
  </code></pre>
  
  <p>The JSON I am using is: <code>{"fruits":["apple","orange"]}</code></p>