HttpMessageNotReadableException

프로젝트

목록 보기
29/39

.w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type java.util.ArrayList<com.myomi.order.dto.OrderDetailRequestDto>from String value (tokenJsonToken.VALUE_STRING); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type java.util.ArrayList<com.myomi.order.dto.OrderDetailRequestDto>from String value (tokenJsonToken.VALUE_STRING)<EOL> at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 100] (through reference chain: com.myomi.order.dto.OrderRequestDto["orderDetails"])]

  • OrderRequestDto에서 orderDetails를
    private List< OrderDetailRequestDto> orderDetails; 로 선언했는데, 객체 생성해주니까 됨.
  • @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)를 추가하라고 하던데 난 아니였음
profile
백엔드를 공부하고 있습니다.

0개의 댓글