NoArgsConstructor1 생성자를 구현했는데도 @NoArgsConstructor를 쓰는 이유 @NoArgsConstructor란?Lombok에서 제공하는 어노테이션으로, 매개 변수가 없는 생성자를 자동으로 생성해준다.만약 Schedule 이라는 클래스가 있다면,public Schedule() { } 위의 코드를 자동으로 추가해주는 어노테이션인 것이다. 발생한 상황프로젝트를 진행하던 중, 아래와 같이 Entity를 만들었다.@Getter@Entity@Table(name = "schedules")@NoArgsConstructor(access = AccessLevel.PROTECTED)public class Schedule extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long .. 2026. 7. 4. 이전 1 다음