当前位置 博文首页 > xzh_blog:JSON parse error: Can not construct instance of 错
spring cloud 服务之间相互调用出错。
?
报错信息:
feign.codec.DecodeException: JSON parse error: Can not construct instance of com.mmtvip.message.ResponseMessage: no String-argument constructor/factory method to deserialize from String value ('无效请求!'); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.mmtvip.message.ResponseMessage: no String-argument constructor/factory method to deserialize from String value ('无效请求!')
?at [Source: java.io.PushbackInputStream@41233828; line: 1, column: 1]
?
?
解决方案:
将接口改为POST请求
@PostMapping("/xzh)
?
cs