springmvc出现 No converter found for return value of type错误
Posted Chris-Chang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springmvc出现 No converter found for return value of type错误相关的知识,希望对你有一定的参考价值。
handler控制器如下
@ResponseBody
@RequestMapping("/sendCompose/object.json")
public ResultEntity<Student> testReceiveComposeObject(@RequestBody Student student)
logger.info(student.toString());
//将“查询”到的Student对象封装到ResultEntity中返回
ResultEntity<Student> resultEntity = ResultEntity.successWithData(student);
return resultEntity;
原因是ResultEntity没有写set和get方法。
以上是关于springmvc出现 No converter found for return value of type错误的主要内容,如果未能解决你的问题,请参考以下文章
No converter found for return value of type: class java.util.HashMap + 'Content-Type' cannot
出现这个错误: No converter found for return value of ..
No converter found for return value of type: class java.util.ArrayList
No converter found for return value of type: class java.util.ArrayList
No converter found for return value of type: class java.util.ArrayList
解决nested exception is java.lang.IllegalArgumentException: No converter found for return value of typ