spring 참조 오류

코딩은 오픈북·2022년 10월 28일

HttpMessageNotWritableException
Cannot call sendError() after the response has been committed
매핑 다 하고 돌려보니까 이런 에러가 떴다.

테이블과 테이블 사이에 Json으로 변환과정에 무한참조 때문에 나타나는 현상이라고 한다.
모든 참조데이터들에 대해 @JsonIgnore를 붙여주니 해결됐다.

참고자료 ) https://to-moneyking.tistory.com/m/67

0개의 댓글