HttpMediaTypeNotSupportedException
来源:互联网 发布:java中for循环语句例子 编辑:程序博客网 时间:2024/06/08 15:56
用spring boot , ajaxSubmit做文件上传时报下面微信客户端console报的错误:
①"Unsupported Media Type"
②WebKitFormBoundaryqgaLFyCj14dJw6y7;charset=UTF-8' not supported
③org.springframework.web.HttpMediaTypeNotSupportedException
搜了很多文章后面发现是我在除了文件的参数封装上加了@RequestBody,像下面这样写了
HttpServletRequest req, @RequestBody FileBusinessRelation fi, @RequestParam(value = "file", required = false) MultipartFile... file
,技术太渣的我没有找到这个错误,后面解决了才发现的。
还有浏览器这样显示的:
HTTP Status 415 -
type Status report
message
description The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
贴出来给大家参考一下,
spring boot 的文件上传可以看看这篇文章(点击打开链接)
其实跟spring boot也没有关系,不过这篇文章下面的链接也有spring mvc 上传的还有spring上传的链接。
- HttpMediaTypeNotSupportedException
- 关于Spring3 MVC的 HttpMediaTypeNotSupportedException
- 关于Spring3 MVC的 HttpMediaTypeNotSupportedException
- HttpMediaTypeNotSupportedException: Content type 'application/json;' not supported 问题原因之一
- HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported
- 在Spring Cloud框架整合微服务时出现的org.springframework.web.HttpMediaTypeNotSupportedException异常问题
- 关于ssm通过ajax来进行数据交互出现的错误:org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'ap
- json_decode无法处理\解决方法
- 训练mnist
- python打包成exe的两种方法对比
- 设置ViewPager滑动切换速度
- 【第13周 项目1 - Prim算法的验证】
- HttpMediaTypeNotSupportedException
- 恢复旋转排序数组
- 冒泡排序-java实现
- ECMAScript6笔记:Class
- Java.lang.reflect.InvocationTargetException
- 过狗脚本
- $(document).ready()和原生js下的window.onload的区别
- (LeetCode)Binary Watch --- 二进制手表
- Android资源知识(二)之Shape Drawable的使用