springBoot后端传值报错的 Type definition error:的问题,紧急!!!!!求大佬

weixin_44136069 2021-05-11 01:23:49
Type definition error: [simple type, class org.json.JSONArray]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.json.JSONArray and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.lecare.frame.pojo.common.response.ResponseResult["data"]->java.util.ArrayList[0])

org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class org.json.JSONArray]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.json.JSONArray and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.lecare.frame.pojo.common.response.ResponseResult["data"]->java.util.ArrayList[0])
...全文
6156 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
画雨笼山 2022-05-19
  • 打赏
  • 举报
回复

实体类没有实现序列化,实体类后面加个implements Serializable

是赵敢敢啊 2021-05-11
  • 打赏
  • 举报
回复
序列化错误了, 可能是对应的controller里边的方法参数上忘记加@RequestBody 注解了
顾染尘 2021-05-11
  • 打赏
  • 举报
回复
InvalidDefinitionException类的包你导入了吗?

81,117

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧