title: @RequestBody is not mapping to the Bean in my Post RestAPI
body: <p>I have a Post method in my restApi in which i am mapping JSON to the Bean using @RequestBody. here is my code for the controller where i map my JSON to Employee bean</p>
  <pre><code>@RestController
  @RequestMapping(&quot;/api/employees&quot;)
  public class EmployeeController {
  
      
      private EmployeeService employeeService;
  
      public EmployeeController(EmployeeService employeeService) {
          super();
          this.employeeService = employeeService;
      }
      
      //build restAPi for create Employee
      
      @PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
      public ResponseEntity&lt;Employee&gt; saveEmployee(@RequestBody Employee employee){
          return new ResponseEntity&lt;Employee&gt;(employeeService.saveEmployee(employee),HttpStatus.CREATED );
          
      }
      
      
  }
  </code></pre>
  <p>Below is the Employee bean class</p>
  <pre><code>@Data
  @Entity //makes this as JPA entity
  @Table(name=&quot;employee&quot;)  // if not defined it creates the table with class name by default
  public class Employee {
      
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private long id;
      
      
      @Column(name = &quot;first_name&quot;)
      private String firstName;
      
      @Column(name = &quot;last_name&quot;)
      private String lastName;
      
      @Column(name=&quot;email_id&quot;)
      private String emailId;
  
  }
  </code></pre>
  <p>Also, this is my Service class</p>
  <pre><code>@Override
  public Employee saveEmployee(Employee employee) {
      // TODO Auto-generated method stub
      return employeeRepository.save(employee);
  }
  </code></pre>
  <p>the JSON request i post to this service is as follows</p>
  <pre><code>{
      &quot;firstName&quot; : &quot;Priya&quot;,
      &quot;lastName&quot; : &quot;Venkatesan&quot;,
      &quot;emailId&quot; : &quot;priyavenkat@gmail.com&quot;
  }
  </code></pre>
  <p>I am not sure what i am missing and i am new for API development. Please request help. Thanks</p>