手机 网站内 搜索,wordpress 调用文章分类,上海搜索推广,网站非法收录用户信息使用postMan调试接口出现 Content type multipart/form-data#xff1b;charsetUTF-8 not supported 问题原因解决方案 最近好久没写springboot项目了#xff0c;然后写了一个添加用户的接口#xff0c;使用postman测试时出现了问题。如下图#xff1a; org.springfr… 使用postMan调试接口出现 Content type multipart/form-datacharsetUTF-8 not supported 问题原因解决方案 最近好久没写springboot项目了然后写了一个添加用户的接口使用postman测试时出现了问题。如下图 org.springframework.web.HttpMediaTypeNotSupportedException: Content type ‘multipart/form-data;boundary--------------------------121447464228391674964565;charsetUTF-8’ not supported 问题原因
原因是接口做了规范默认就是通过RequestBody 的方式请求的也就是每一个请求必须是通过实体对象进行传参不能通过form-data 表单提交的方式进行传参 解决方案
body选择为raw模式同时改文件格式为json方式提交