1.Content type not supported
雷电模拟器调试,后台断点调试时,fiddler捕获多次重复请求(都是未完成进行中的请求,常规的下载箭头),便准备用postman发送请求调式。遇到后台错误,postman接收到的响应结果为
{
"code": "500",
"msg": "服务器错误!"
}
后台异常为:
Content type 'multipart/form-data;boundary=--------------------------399451406379538159072279;charset=UTF-8' not supported
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'multipart/form-data;boundary=--------------------------399451406379538159072279;charset=UTF-8' not supported
取消掉postman请求header 中默认content-type配置
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
度娘后说是
@RequestBody与 content type有冲突,无法识别是表单提交还是json提交
Content type ‘multipart/form-data;boundary=--------------------------9107
果真是 @RequestBody 接收参数。不够注意细节。
2.to be continue
。。。