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

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

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