json LocalDateTime转对象

发布时间 2023-11-18 21:01:34作者: oktokeep

json LocalDateTime转对象

feign.codec.DecodeException: JSON parse error: Can not deserialize instance of java.time.LocalDateTime out of START_ARRAY token; nested exception is
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.time.LocalDateTime out of START_ARRAY token
at [Source: java.io.PushbackInputStream@60c5c98b; line: 1, column: 525] (through reference chain: com.test.commons.web.ResponseData["data"]->
com.test.order.commons.entity.orderDetailDto["settleTime"])

解决方案:增加jar:
compile ("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")