Notice
Recent Posts
Recent Comments
Link
민스씨의 일취일장
TIssue | DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported] 해결방법 본문
Programming Language & Framework/JAVA & Spring
TIssue | DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported] 해결방법
읻민스 2023. 1. 21. 22:56반응형
Postman을 사용해서 request, response 테스트를 진행하면서 발생한 오류 중 Contetn type 'text/plain; charset=UTF-8" not wupported에 대한 글이다.
DefaultHandlerExceptionResolver 에러 발생
에러
WARN 4203 --- [nio-8080-exec-7] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported]
원인
Content-Type이 알맞지 않아서 발생한 오류이다.
해결방법
Headers 객체에서 Content-Typed을 text/plain에서 applicaion/json으로 변경해 주면된다.
주의
Postman에서는 Headers 객체 수정이 안될 수 있다. 이럴 땐 Body에서 JSON 항목을 선택해 주면 된다.
728x90
반응형
'Programming Language & Framework > JAVA & Spring' 카테고리의 다른 글
TIssue | 스프링의 정석 AOP 진행중 Java Runtime 버전 오류 해결방법 (0) | 2023.02.01 |
---|---|
LogT | Java Spring의 AOP에 대해 알게된 모든 내용과 고민들 (0) | 2023.01.26 |
LogT | Java Spring의 DispatcherServlet에 대해 알게된 모든 내용과 고민들 (0) | 2023.01.19 |
LogT | Java Spring의 DAO에 대해 알게된 모든 내용과 고민들 (0) | 2023.01.17 |
TIssue | org.springframework.beans.factory.NoSuchBeanDefinitionException (0) | 2023.01.17 |