解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util
来源:互联网 发布:杭州行知小学校区 编辑:程序博客网 时间:2024/05/29 14:52
1.原因:这是因为springmvc默认是没有对象转换成json的转换器的,需要手动添加jackson依赖。
2.解决步骤:
手动添加jackson依赖到pom.xml文件中
<properties> <jackson.version>2.5.4</jackson.version> </properties>
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency>
如果还是没有解决,则进行以下步骤
在springmvc配置文件中进行如下配置
<mvc:annotation-driven> <mvc:message-converters> <bean class="org.springframework.http.converter.StringHttpMessageConverter"/> <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/> </mvc:message-converters></mvc:annotation-driven>
阅读全文
0 0
- 解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util
- 解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util
- java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.Has
- java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.Has
- java.lang.IllegalArgumentException: No converter found for return value of type: class java.util
- 【已解决】java.lang.IllegalArgumentException: No converter found for return value of type: class java.uti
- java.lang.IllegalArgumentException: No converter found for return value of type: class
- 记录下报错:java.lang.IllegalArgumentException: No converter found for return value of type: class
- springmvc框架报错java.lang.IllegalArgumentException: No converter found for return value of type: class
- java.lang.IllegalArgumentException: No converter found for return value of type:class 解决方案
- 关于java.lang.IllegalArgumentException: No converter found for return value of type: class 的问题解决
- 解决java.lang.IllegalArgumentException: No converter found for return value of type:
- java.lang.IllegalArgumentException: No converter found for return value of type
- java.lang.IllegalArgumentException: No converter found for return value of type
- springboot错误 java.lang.IllegalArgumentException:No converter found for return value of type
- java.lang.IllegalArgumentException: No converter found for return value of type:
- 解决java.lang.IllegalArgumentException: No converter found for return
- springMVC返回json格式数据报错:No converter found for return value of type: class java.util.HashMap
- DPDK 编译debug 版本
- 测试
- 五步教你制作漂亮精致的HTML时钟
- 程序员有趣的面试智力题
- Node第一个应用
- 解决java.lang.IllegalArgumentException: No converter found for return value of type: class java.util
- caffe训练模型输出到log.txt
- ESP8266 基础篇:内存分布
- Unity 动画系统出错
- test
- Spark Master和Work启动过程
- HANA 实践遇到的知识点
- MySQL中函数CONCAT及GROUP_CONCAT
- css选择器