前台报的
后台错误信息
Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.Integer` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Integer` out of START_OBJECT token
at [Source: (PushbackInputStream); line: 1, column: 1]]
个人怀疑是Integer没有实现序列化接口的原因
对比了一下String类型的
反正我是这么觉得,如果有更清楚地,还望告知,必定洗耳恭听,万分感谢
最后
以上就是精明香氛最近收集整理的关于@RequestBody 无法接收单个Integer类型的参数的全部内容,更多相关@RequestBody内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复