title: Spring Boot throws exception when int field in mongodb model has null value in the database
body: <p>I have a situation when a user does not enter data for certain field I pass null as value for that int field to signify that no value was entered by the user like</p>
  
  <pre><code>{user: 'John',
   age: null}
  </code></pre>
  
  <p>but when I read such document in my Spring Boot application, when it encounters above document, throws </p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Parameter age must not be null!
  </code></pre>
  
  <p>Is null allowed value in mongodb or Spring Boot is doing something wrong?</p>
  
  <p>I tried to:</p>
  
  <pre><code>@Data
  @Document
  public class User {
      final private String user;
      @org.springframework.lang.Nullable    
      final private int age;
  }
  </code></pre>
  
  <p>But it makes no difference. How to solve this problem other than not storing null ( because null is already populated in another node/mongoose application (which gladly stores and reads null values without any issue) using the same mongodb database?</p>