title: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to com.example.backendtest.Project
body: <p>I am using http post requests angular4 with spring boot and I need to send different Objects from angular to the backend that's why I am using the type object and then trying to cast this object to my java class (In my Example Project and User) but I am getting this exception.
  this is my http post method:</p>
  
  <pre><code>@PostMapping("/project")
  public void addProject(@RequestBody HashMap&lt;String, Object&gt; map) {
      Project project1 = (Project) map.get("project");
      System.out.println(project1.getName());
      List&lt;User&gt; users = (List&lt;User&gt;) map.get("users");
      System.out.println(users.get(0));
  }
  </code></pre>