Notice
Recent Posts
Recent Comments
Link
웁스교교주의 이야기
[spring boot] @RequestBody application/x-www-form-urlencoded 처리 본문
Spring boot에서 @RequestBody 사용시 application/x-www-form-urlencoded 으로 Content type 을 보내면
"status": 415,
"error": "Unsupported Media Type",
"exception": "org.springframework.web.HttpMediaTypeNotSupportedException",
"message": "Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported",
의 에러가 발생합니다.
검색을하면 지원을 안하는 것으로 나오는데... 맞는지 모르네요.
일단 Content type을 application/json으로 하면
제대로 작동합니다.
혹시 다른 방법을 아시는 분 있으시면 댓글 부탁드립니다.
'개발 > Spring' 카테고리의 다른 글
spring 구동시 profile 옵션 주기 (0) | 2018.06.14 |
---|---|
[spring boot] WebSecurityConfigurerAdapter 에러 (0) | 2017.10.18 |
[spirngboot] characterEncodingFilter->OrderedCharacterEncodingFilter 변경 (0) | 2017.03.24 |
grade bootrun profile 설정 (0) | 2017.03.21 |
[Spring Boot] http 와 https 설정하기 (0) | 2017.02.28 |