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

JSON parse error: Can not construct instance of 错误

程序员文章站 2022-04-15 10:44:27
...

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: [email protected]; line: 1, column: 1]

 

 

解决方案:

将接口改为POST请求

@PostMapping("/xzh)

 

相关标签: post