[Java+SpringBoot+JPA] 기본 CRUD 구현하기 (3)검증 오류 추가
검증(Validation) 올바른 데이터인지 판별하는 것이 목적 전송된 데이터의 유효성을 검사하고, 오류 발생 시 각 레이어에서 적절한 조치를 취할 수 있다. 🟢 Entity 검증 오류를 추가하기 위해서는 필드에 nullable=false를 선언하여 null 값이 들어가지 않도록 설정 @Entity @Builder @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Table(name = "product") @SequenceGenerator( name = "product_SEQ", sequenceName = "product_SEQ", initialValue = 1, allocationSize = 1) public class ProductEntity exte..
2023.12.24