순환참조1 [JPA] @JsonBackReference, @JsonManagedReference ✔ 문제엔티티 구조A_entity(부모)↳ B_entity (부모: A_entity, 자식: C_entity)↳ C_entity (부모: B_entity, N:1 참조: D_entity)↳ D_entity (부모: X)// C_entity @JsonBackReference @ManyToOne @JoinColumn(name = "D_entity_id") private D_entity d_entity; JPA 를 사용하는 프로젝트에서 C_entity에서 D_entity 조회가 안되는 오류 ✔ 해결과정@JsonBackReference 어노테이션 제거@JsonBackReference는 자식 엔티티에서 부모 엔티티의 정보를 숨겨서, JSON 직렬화 시 순환 참조 문제를 해결하는 데 도움을.. 2024. 9. 23. 이전 1 다음