欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

springmvc之ResponseBody响应json数据遇到的错误及解决

程序员文章站 2022-06-15 19:38:41
使用@RequestBody注解把json的字符串转换成JavaBean的对象代码实践过程中遇到错误:[http-apr-8080-exec-2] org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleHttpMessageNotReadable Failed to read HTTP message: org.springframework.http.converter.HttpMessageN...

使用@RequestBody注解把json的字符串转换成JavaBean的对象

代码实践过程中遇到错误:[http-apr-8080-exec-2] org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleHttpMessageNotReadable Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character (‘ï’ (code 239)): was expecting a colon to separate field name and value; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character (‘ï’ (code 239)): was expecting a colon to separate field name and value
at [Source: (PushbackInputStream); line: 1, column: 13]springmvc之ResponseBody响应json数据遇到的错误及解决
检查一下发现springmvc之ResponseBody响应json数据遇到的错误及解决
改正之后成功springmvc之ResponseBody响应json数据遇到的错误及解决
总结:代码一定要规范,不要中英文书写错误

本文地址:https://blog.csdn.net/BG12345633/article/details/107533447

相关标签: java spring