java.lang.IllegalArgumentException: No converter found for return value of type: class
来源:互联网 发布:淘宝大号怎么关联小号 编辑:程序博客网 时间:2024/06/05 05:44
原文地址
http://stackoverflow.com/questions/33832735/spring-boot-application-no-converter-found-for-return-value-of-type
原因:请求返回的数据无法转换,需要添加如下配置
1.在pom.xml 里添加
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.4.3</version></dependency><dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.4.3</version></dependency>
2.在spring-mvc 配置文件添加下面的配置,不使用默认的配置
<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.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.uti
- 解决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
- 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
- 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 value of type:
- SpringMVC 返回json数据报错IllegalArgumentException: No converter found for return value of type:xxx
- 解决java.lang.IllegalArgumentException: No converter found for return
- 设计模式之模板模式(C++实现)
- SpringMVC之视图解析器及解析过程浅析
- Bootstrap Datatable 简单的基本配置
- 身份验证正则表达式
- JAVA事务
- java.lang.IllegalArgumentException: No converter found for return value of type: class
- ProgressDialog简单封装
- 【交换安全】DAI - Dynamic ARP Inspection 详解
- 10 scrapy框架解读--深入理解爬虫原理
- Linux shell function call Sample
- Tomcat 7最大并发连接数的正确修改方法
- SystemUI浅析
- Java中的Random()函数
- js登录界面判断输入的用户名和密码是否为空