I use Lombok on Hibernate entities, and have inheritance:
@MappedSuperclass
@Data
public class BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Boolean enabled;
public BaseEntity() {
enabled = true;
}
}
@Entity
@Data
public class Event extends BaseEntity {
private String name;
private LocalDateTime start;
private LocalDateTime end;
private Boolean isTaxable;
}
Eclipse warns on child @Data:
Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
as mentioned here Warning equals/hashCode on @Data annotation lombok with inheritance
I can use
lombok.equalsAndHashCode.callSuper = call
how can I use this property in spring application.properties file? Should I create lombok.config file near the application.properties and put it there instead?
I tried to add it to application.properties
lombok.equalsAndHashCode.callSuper = call
but Eclipse says this property unknown and Warning on child class @Data annotation still present.