0gam
@JsonIgnoreProperties(ignoreUnknown = true) 본문
프로젝트 진행중,
AJAX를 이용하여
@response List<객체> 로 response에 담아 리스트를 사용하려 하였을 때 당했던 일이다.
대충 에러 내용이
List<객체> -> 객체 -> 객체 로 이어진 관계를 표현할 수 없다. - 잭슨 맵퍼
라는 것을 보고 검색을 시작하였다.
바로 나오는 결과는
엔티티 관계를 제이슨이 무시하게 해줘라. 였다.
말 그대로 사용하는 List<객체>의 객체의 연관관계를 제이슨이 무시할 수 있도록,
해당 엔티티 상단에 @JsonIgnoreProperties(ignoreUnknown = true) ,에러에서 설명해준 객체에 @JsonIgnore(true) 를 설정해주었다.
끝.
'Spring Framework' 카테고리의 다른 글
spring security session-registry (0) | 2017.02.08 |
---|---|
@Controller , @RestController (0) | 2016.09.20 |
produces, consumes (0) | 2016.07.27 |
Azure Web Service enable Cookie. (0) | 2016.06.24 |
<default-servlet-handler/> (0) | 2016.06.24 |