title: how to get list of objects via requestbody in spring boot api
body: <p>To get list of objects via <code>@RequestBody</code>  in controller and process each object in a <code>list</code> to do a business logic.</p>
  
  <p>I have tried this but not working</p>
  
  <pre><code>@RequestMapping(value="/updateservicetype", method=RequestMethod.POST,produces="application/json")
      public @ResponseBody ServiceTypesMessage updateServiceType(@RequestBody List&lt;BarberServiceType&gt; serviceTypes,final HttpServletResponse response){
  </code></pre>
  
  <p>also tried following:</p>
  
  <pre><code>@RequestMapping(value="/updateservicetype", method=RequestMethod.POST,produces="application/json")
      public @ResponseBody ServiceTypesMessage updateServiceType(@RequestBody BarberServiceType[] serviceTypes,final HttpServletResponse response){
  </code></pre>