@RequiredArgsConstructor will be generated if no constructor has been defined.

The Project Lombok @Data page explains:

@Data is like having implicit @Getter, @Setter, @ToString, @EqualsAndHashCode and @RequiredArgsConstructor annotations on the class (except that no constructor will be generated if any explicitly written constructor exists).

Leave a Reply

Your email address will not be published. Required fields are marked *