I/O error while reading input message
错误信息: I/O error while reading input message; nested exception is java.io.IOException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character \u00275\u0027 (code 53) in prolog; expected \u0027\u003c\u0027\n at [row,col {unknown-source}]: [1,1] 使用 JsonResult(公司统一封装响应结果类型) 接收 restTemplate 方式调用其他服务接口的响应信息,报错如上所示。 通过错误信息 I/O error while reading input message; 搜索在源码中发现是类型转化错误导致的,调用不同的接口返回的响应结果是不一致的。 我接收响应结果类型为:{"success":true,"businessCode":"1","errorCode":"200","msg":"","data":"重试成功!"},公司统一封装的响应结果类型。 我调用A接口返回的结果类型为我上面定义的接收类型,但是我调用B接口他返回的数据是一个字符串,所以导致我接受响应结果的时候类型转换异常。 解决方案