title: Jackson + FAIL_ON_MISSING_CREATOR_PROPERTIES + Lombok
body: <p>I'm attempting to use a Jackson flag on the objectMapper</p>
  
  <pre><code>objectMapper.enable(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES);
  </code></pre>
  
  <p>This should cause object deserialization to fail if a constructor argument is not set in the json. i.e. If a field is missing as opposed to being set to null.</p>
  
  <p>But I noticed that it only works if the object I want to deserialize has a constructor like so</p>
  
  <pre><code>public MyObject(@JsonProperty("id") UUID id, @JsonProperty("url") URL url) {
      this.id = id;
      this.url = url;
  }
  </code></pre>
  
  <p>That's a little problematic as I'd hoped to use lombok's @AllArgsConstructor to generate the constructor. But if the constructor is missing the @JsonProperty(..) the FAIL_ON_MISSING_CREATOR_PROPERTIES check does not work. Instead the parameters are passed in as null.</p>
  
  <p>I've come across some solutions here <a href="https://stackoverflow.com/questions/39381474/cant-make-jackson-and-lombok-work-together">Can&#39;t make Jackson and Lombok work together</a>. But so far they're not working for me. </p>
  
  <p>Any suggestions?</p>
  
  <p>--- Update ---</p>
  
  <p>The annotations on my class are</p>
  
  <pre><code>@Data
  @Builder
  @ToString
  @NoArgsConstructor
  @AllArgsConstructor
  @EqualsAndHashCode
  @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
  @JsonInclude(JsonInclude.Include.NON_DEFAULT)
  public class MyClass { ... }
  </code></pre>