首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >spring boot List类型参数转换异常怎么处理?

spring boot List类型参数转换异常怎么处理?

提问于 2019-08-05 10:39:10
回答 0关注 0查看 1K

后端使用spring boot提供接口。源码如图:

前端使用axios调用。源码如图:

控制台报错:

2019-08-05 10:19:33.899 WARN 8272 --- [nio-8080-exec-9] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token

at [Source: java.io.PushbackInputStream@55b3d615; line: 1, column: 1]

2019-08-05 10:19:33.899 WARN 8272 --- [nio-8080-exec-9] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token

at [Source: java.io.PushbackInputStream@55b3d615; line: 1, column: 1]

也尝试通过qs插件或者原生JSON对象的序列方法对tasks参数进行序列化操作,但是仍然还是会报解析异常,求问大佬这个要怎么处理?

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档