Entity
-
JPA Entity에 public or protected no-arg constructor가 필수인 이유JPA 2024. 10. 9. 22:29
개요JPA Entity에 public or protected no-arg constructor가 필수인 이유JPA 엔티티 클래스의 기본 생성자와 리플렉션JPA 명세엔티티 클래스는 기본 생성자(매개변수가 없는 생성자)를 반드시 가져야 한다.추가로 다른 생성자를 가지는 것은 상관 없다.기본 생성자는 반드시 public 또는 protected로 선언되어야 한다.원문The entity class must have a no-arg constructor. The entity class may have other constructors as well. The no-arg constructor must be public or protected.위의 내용이 있는 JPA 스펙: https://jakarta.ee/speci..