后端使用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参数进行序列化操作,但是仍然还是会报解析异常,求问大佬这个要怎么处理?
相似问题