[Lombok][Error] @Builder 필드 초기화 @Builder.Default

희원·2022년 3월 30일
0

에러 메시지

@Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. If it is not supposed to be settable during building, make the field final.

원인

@Builder는 초기화 표현을 완전히 무시한다. @Builder.Default를 사용하거나 final로 선언해라.

해결

초기값이 있는 필드에 @Builder.Default 추가

참고

profile
모든 시작은 사소함으로부터

0개의 댓글