JAVA/Error

# Spring Boot # Content type 'text/plain;charset=UTF-8' not supported

skysoo1111 2019. 10. 24. 10:56

@RequestMapping 값을 받으려는데 아래 Error 발생

[시간] WARN 8 --- [nio-8080-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported]

 

해결법

Headers에 Content-Type:application/json 을 넣어라.