Demo playground for Java DTO best practices

How to properly annotate Java classes with Jackson and Lombok annotations?

  1. Compose fields example and demo tests
  2. Inheritance example and demo tests
     @Value
     @SuperBuilder
     @EqualsAndHashCode(callSuper = true)
     public class CreditCard extends Card {
     BigDecimal rate;
     
         @ConstructorProperties({"name", "status", "balance", "rate"})
         public CreditCard(String name, Status status, Balance balance, BigDecimal rate) {
             super(name, status, balance);
             this.rate = rate;
         }
     }
  3. Mutable objects example and demo tests

No need Jackson annotations when it's possible!

Find more on the dev.to