SpringBoot添加时报错

Caused by: org.springframework.web.client.RestClientException: Error while extracting response for type [int] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of int out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of int out of START_OBJECT token

2个回答

使用Integer接收试下!最好贴一下源码,不然不好找错。看报错意思是反序列化问题

看一下你序列化的两个实体有什么区别,两个实体应该有一个int类型的参数没有对应上

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问