title: How to ignore specific fields on income in Spring boot?
body: <p>I have my domain class as follows</p>
  
  <pre><code>@Getter
  @Setter
  public class Student {
  
      private Long id;
      private String firstName;
      private String lastName;
  
  }
  </code></pre>
  
  <p>And I have this controller</p>
  
  <pre><code>@RestController
  @RequestMapping("/student")
  public class StudentController {
  
      @PostMapping(consumes = "application/json", produces = "application/json")
      public ResponseEntity&lt;Student&gt; post(@RequestBody Student student) {
          //todo save student info in db, it get's an auto-generated id
          return new ResponseEntity&lt;&gt;(student, HttpStatus.CREATED);        
      }
  
  }
  </code></pre>
  
  <p>Now what I want is to configure serializer in a way that it ignores the <code>id</code> field on income, so I get only <code>firstName</code> and <code>lastName</code>, but serialize it when I'm returning the object to the caller.</p>