본문 바로가기

Java/Spring

Json 통신 시 "org.codehaus.jackson.map.JsonMappingException" 해결 방법


Json 통신 시 "org.springframework.web.servlet.view.json.MappingJacksonJsonView" 를 사용할 경우 해당 오류가 발생할 수 있다.

이경우 

Model의 Getter 부분에 @JsonIgnore Annotation을 넣어주면 해결된다.


ex)

@JsonIgnore
public MultipartFile getMemberPhotoFile() {

return memberPhotoFile;

}