HttpMediaTypeNotAcceptableException: Could not find acceptable representation原因及解决方法
2017-11-28 16:15
1216 查看
HttpMediaTypeNotAcceptableException: Could not find acceptable representation
错误原因:请求contenttype=application/json;charset=UTF-8,而这里的produces=text/html
原来代码:@RequestMapping(value = "/upload", method = RequestMethod.POST, produces = "text/html; charset=UTF-8")
解决方法:去掉 produces = "text/html; charset=UTF-8"这段代码或者设置produces=application/json;charset=UTF-8
相关文章推荐
- Spring Boot: HttpMediaTypeNotAcceptableException: Could not find acceptable representation原因及解决方法
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio
- 76. Spring Boot完美解决(406)Could not find acceptable representation原因及解决方法
- HttpMediaTypeNotSupportedException: Content type 'application/json;' not supported 问题原因之一
- "Could not find mime type application octet-stream"错误的解决方法
- spring 4 异常HttpMediaTypeNotAcceptableException解决方案
- springmvc @ResponseBody HttpMediaTypeNotAcceptableException
- Could not load type '_Default'. 原因和解决方法
- http错误:Could not find acceptable representation
- HttpMediaTypeNotSupportedException
- Xcode真机测试could not find developer disk image解决方法
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- ajax使用向Spring MVC发送JSON数据出现 org.springframework.web.HttpMediaTypeNotSupportedException: Content type
- Java中Could not find the main class.program will exit和java.lang.UnsupportedClassVersionError 的解决方法
- Could not load type System.ServiceModel.Activation.HttpModule解决办法
- Android项目导入时 Could not find class的可能解决方法