spring使用jackson返回object报错:Handler execution resulted in exception: Could not find acceptable representation
问题:在springmvc中添加Jackson jar包返回Object类型,处理器方法的produces属性不写,默认根据类型,但如果指定了(错误原因)produces = "text/html;charset=utf-8"就会报错
错误码: Handler execution resulted in exception: Could not find acceptable representation
正确配置:
@RequestMapping(value = "/jacksonMap.do", produces = "application/json;charset=utf-8")
spring使用jackson返回object报错:Handler execution resulted in exception: Could not find acceptable representation的更多相关文章
- 解决:oracle+myBatis ResultMap 类型为 map 时返回结果中存在 timestamp 时使用 jackson 转 json 报错
前言:最近在做一个通用查询单表的组件,所以 sql 的写法就是 select *,然后 resultType="map" ,然后使用 jackson @ResponseBody 返 ...
- 【spring mvc】后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface
后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate ...
- 使用wkwebview时,push后,再pop返回,报错
使用wkwebview时,push后,再pop返回,报错 Cannot form weak reference to instance (xxxx) of class xxxx. It is poss ...
- Spring Security和Swagger2集成报错
出现问题的项目算是一个新项目,但基本的脚手架代码是从另一个项目里迁过来的,原项目并没有报错,只有新项目才报异常.看报错内容,判断发生冲突的主要是spring-boot-starter-security ...
- eclipes的Spring注解SequenceGenerator(name="sequenceGenerator")报错的解决方式
eclipes的Spring注解SequenceGenerator(name="sequenceGenerator")报错的解决方式 右键项目打开Properties—>JA ...
- 使用CXF+Spring发布WebService,启动报错
使用CXF+Spring发布WebService,启动报错,日志如下: 五月 12, 2017 9:01:37 下午 org.apache.tomcat.util.digester.SetProper ...
- spring boot启动STS 运行报错 java.lang.NoClassDefFoundError: ch/qos/logback/classic/LoggerContext
spring boot启动STS 运行报错 java.lang.NoClassDefFoundError: ch/qos/logback/classic/LoggerContext 学习了: http ...
- SpringBoot与jackson.databind兼容报错问题
SpringBoot与jackson.databind兼容报错问题 ———————————————— 1.SpringBoot版本V2.0.0其依赖的jackson-databind版本为V2.9.4 ...
- zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException
zookeeper报错: org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.EOFException 主要因为是没有序列化. 可以使用 ...
随机推荐
- Django serializers 序列化 rest_framework
参考官方文档1(你懂的):http://www.django-rest-framework.org/api-guide/serializers/ 参考官方文档2(你懂的):http://www.dja ...
- ARM寻址方式
寻址方式: 所谓寻址方式就是处理器根据指令中给出的信息来找到指令所需操作数的方式. 1.立即数寻址 2.寄存器寻址 3.寄存器间接寻址 就是寄存器中存放的是操作数在内存中的地址 例如以下指令: LDR ...
- java传递和返回对象
java传递的只是一个引用,一定要注意准确认识在对象传递和赋值时所发生的一切. 事实上,java中的每个对象(除了基本数据类型以外)的标识符都属于指针的一种,但是其使用受到了严格的限制和防范,不仅在编 ...
- Ubuntu升级没有声音的解决方法
自从安装U14.04LTS版本后,每次开机都会弹出update窗,以前因为网络速度慢没更新成功过,这回环境允许就尝试了下这个过程,很顺利,可更新后没声音了,找了N中方法来解决,像更改配置文件/etc/ ...
- Codeforces Round #249 (Div. 2)B(贪心法)
B. Pasha Maximizes time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- Simulating a Freight robot in Gazebo
Installation Before installing the simulation environment, make sure your desktop is setup with a st ...
- 使用spring过程中遇到的问题
1.java.lang.SecurityException: sealing violation: package javax.servlet is sealed java.lang.Security ...
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...
- DBCP、C3P0、Proxool 、 BoneCP开源连接池的比《转》
简介 使用评价 项目主页 DBCP DBCP是一个依赖Jakarta commons-pool对象池机制的数据库连接池.DBCP可以直接的在应用程序用使用 可以设置最大和最小连接,连接等待时 ...
- Hibernate的集合映射与sort、order-by属性
[Hibernate]Hibernate的集合映射与sort.order-by属性 常用集合Set.List.Map,相信大家都很熟悉,面试中也会经常问.Set和List都继承了Collection接 ...