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)

猜你喜欢

转载自blog.csdn.net/Anenan/article/details/84587746