받는 POST에 문제가 있습니다. 나는 응답에서 다음을 얻을,스프링의 콘텐츠 유형 문제
이제@RequestMapping(value = "/payment", method = POST)
public void saveOrder(@RequestBody PaymentDto paymentDto) throws RequiredFieldException, IOException, MessagingException {
//do something
}
가, 누군가가 나이 URL에 POST 전송 : 나는 다음과 같은 엔드 포인트를
{"errorMessage":"Unsupported Media Type",
"errorId":"906f5dc8-0b79-4f91-9eaa-a252e8d5ac76",
"errorDetails":
{"message":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported",
"exception":"org.springframework.web.HttpMediaTypeNotSupportedException",
"errors":null
}}
내가 그 문제를 해결할 수 있습니까? 콘텐츠 유형 헤더를 보낼 때 변경할 수 없습니다. 내가 제어하지 않는 서버에서 전송됩니다.
할 수있다 이것과 중복됩니다 : http://stackoverflow.com/questions/33796218/content-type-application-x-www-form-urlencodedcharset-utf-8-not-supported-for – Minh