Tuesday, December 30, 2014

Exclude @ToString in @Data in Lombok

I guess there is no way to exclude @ToString in @Data in Lombok.

@Data is equivalent to

@Getter
@Setter
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode

So instead of @Data, you can just use the following annotations:

@Getter
@Setter
@RequiredArgsConstructor
@EqualsAndHashCode

No comments:

Post a Comment