错误栈 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_OBJECT token
at [Source: (PushbackInputStream); line: 1, column: 142] (through reference chain: com.infoepoch.entity.bean.DxQyweixinMedia["file_name"])
是因为参数不一样,我的代码是添加文件然后将文件名称入数据库,因为后端处理文件然后文件名传给前端,但是传过去的是Map,所以就报这个错,网上也说是入参错误,这个也属于此类情况,入的Map就报了这个错,解决办法:在前端把想要的值单独取出来即可,遇到此类情况优先考虑前后端传的参数类型是否一样