MappedSuperClass
-
JPA Auditing카테고리 없음 2024. 6. 27. 12:28
JPA AuditingJPA를 사용하는 애플리케이션에서 entity 클래스의 생성 및 수정 시점에 대한 자동 기록 기능을 제공하는 방법이를 통해 데이터베이스에 저장된 entity 객체의 생성 시간, 마지막 수정 시간, 생성자, 수정자 등을 자동으로 기록할 수 있음자동으로 데이터 변경 이력을 관리할 수 있어 편리함 JPA Annotation @MappedSuperclass 공통 필드나 매핑 정보를 여러 엔티티에서 공유할 수 있도록 하기 위해 사용되는 어노테이션@MappedSuperclass가 선언된 클래스는 실제 엔티티가 아니며 데이터베이스 테이블과 직접적으로 매핑되지 않음대신 이 클래스를 상속받는 엔티티 클래스에 매핑 정보가 전달됨여러 엔티티에 공통적으로 적용되는 필드 (ex. 생성 시간, 수정 시간..