关于"Could not find acceptable representation"错误
在项目中调用一个第三方服务,第三方服务是用Spring Boot写成的。结果调用时返回"Could not find acceptable representation"错误。
经过调查和搜索,除了网上查到的其他方案之外,有可能是客户端Header参数Accept没有设置或者Accept设置的值在服务端不支持导致的,例如服务端自定义Accept值,而客户端没有传;或者传错了。
关于"Could not find acceptable representation"错误的更多相关文章
- 使用@ResponseBody 出现错误Could not find acceptable representation
org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representatio ...
- spring使用jackson返回object报错:Handler execution resulted in exception: Could not find acceptable representation
问题:在springmvc中添加Jackson jar包返回Object类型,处理器方法的produces属性不写,默认根据类型,但如果指定了(错误原因)produces = "text/h ...
- Springboot实体类转JSON报错Could not find acceptable representation & 设置访问项目根路径的默认欢迎页面
=================实体类转JSON报错的解决办法============= 之前在springmvc的时候也报过这个错,原因以及springmvc中解决办法参考:https://www ...
- 76. Spring Boot完美解决(406)Could not find acceptable representation原因及解决方法
[原创文章] 使用Spring Boot的Web项目,处理/login请求的控制器方法(该方法会返回JSON格式的数据).此时如果访问localhost:8080/login.html, ...
- org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
异常信息 org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable represen ...
- SpringBoot导出excel数据报错Could not find acceptable representation
转自:https://blog.csdn.net/mate_ge/article/details/93518286?utm_source=distribute.pc_relevant.none-tas ...
- [排错] SpringBoot 警告 Could not find acceptable representation
环境 Java 1.8 SpringBoot 2.1.9 Java 接口代码 @ResponseBody @RequestMapping(value = "cloud", meth ...
- Could not find acceptable representation
引起的原因: 由于设置了@ResponseBody,要把对象转换成json格式,缺少转换依赖的jar包,故此错. 解决办法: <dependency> <groupId> ...
- SpringMVC异常报406 (Not Acceptable)的解决办法
使用SpsringMVC,使用restEasy调试,controller请求设置如下: @RequestMapping(value="/list",method=RequestMe ...
随机推荐
- Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ma ven/cli/Maven
此异常是由于jdk版本和maven版本不一致导致的 在maven官网上的说明是这样的:Maven 3.3+ require JDK 1.7 or above to execute - they sti ...
- vmWare pro 14.1.1+ubuntu-desktop-amd64的总体安装流程
vmWare pro正常安装 下载后双击安装,按步骤走即可 创建虚拟机 设置虚拟机 window设置虚拟化技术 电脑重启后,弹出如下所示,选择 疑难解答->高级选项->UEFI固件设置-& ...
- offset系列、scroll系列与client系列
offset系列: offsetLeft:获取元素距离最左边的距离,自身的margin包括在内,不包括自身的border offsetTop:获取元素距离最上边的距离,自身的margin包括在内,不包 ...
- La nuova tecnologia del puntatore laser
Il potente puntatore laser 20000 mW viene fornito di serie con gestione termica e driver laser di qu ...
- 干了这碗鸡汤:从理发店小弟到阿里P10技术大牛
1.引言 MIT TR 35(MIT Technology Review 35 Innovators Under 35)——“全球 35 位 35 岁以下科技创新青年”榜单,是全球最权威的青年科技创新 ...
- MyBatis 的 XML 映射文件使用说明
简介 文档参考地址:http://www.mybatis.org/mybatis-3/zh/index.html MyBatis 的真正强大在于它的映射语句,也是它的魔力所在.由于它的异常强大,映射器 ...
- display: table-cell的实用应用
概述 之前工作中碰到了一个垂直居中问题,最后通过查资料利用table-cell解决.于是打算总结一下有关table-cell的应用,记录下来,供以后开发时参考,相信对其他人也有用. 参考资料:我所知道 ...
- OAuth2简易实战(三)-JWT
1. OAuth2简易实战(三)-JWT 1.1. 与OAuth2授权码模式差别 授权服务器代码修改 @Configuration @EnableAuthorizationServer public ...
- linux上安装jdk环境
只在于安装jdk1.6.jdk1.7和jdk1.8,其他版本请绕行,目的在于方便自己和大家以后急于做jdk环境,苦于没有jdk安装包和设置变量的过程,我将安装包均放在云盘中, 需要直接在连接中找即可: ...
- WebService学习-第一弹
一:WebService简介(1)简介----百度百科(注意标识的重点) Web service是一个平台独立的,低耦合的,自包含的.基于可编程的web的应用程序,可使用开放的XML(标准通用标记语言 ...