JSON1 [ SpringBoot / JPA ] 무한 참조 문제 해결 : :java.lang.IllegalStateException: Cannot call sendError() after the response has been committed 에러 내용 java.lang.IllegalStateException: Cannot call sendError() after the response has been committed Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException] 이미지 별로 좋아요 정보를 가져오는 로직에서 사용자가 올린 게시물에 좋아요를 누르지 않았을 때는 무한 참조가 발생하지 않았었는데 1번 사용자가 2번 사용자의 이미지 게시물을 좋아요 누르자 마자 새로 로딩하면 무한참조가 발생하는 문제가 발생했다. 이를 해결하기 위해 postman으로 데이터를 찍어보았다. 다음과 같이 좋아요 정보인 l.. 2024. 3. 18. 이전 1 다음