spring boot 踩坑日记-Request processing failed; nested exception is feign.codec.DecodeException: Error w

错误信息:

"Request processing failed; nested exception is feign.codec.DecodeException: Error while extracting response for type [cn.silucaihong.scheduling.common.ResultBean] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of `cn.silucaihong.scheduling.common.ResultBean` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `cn.silucaihong.scheduling.common.ResultBean` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)\n at [Source: (PushbackInputStream); line: 1, column: 2]",

service control:

spring boot 踩坑日记-Request processing failed; nested exception is feign.codec.DecodeException: Error w_第1张图片

feign 接口:

spring boot 踩坑日记-Request processing failed; nested exception is feign.codec.DecodeException: Error w_第2张图片

注意我这样写是完全正确的

响应对象:

spring boot 踩坑日记-Request processing failed; nested exception is feign.codec.DecodeException: Error w_第3张图片

因为feign是通过http请求访问服务的所以可以不实现serializable接口

出现错误的原因是没有空的构造器,加上空的构造器就KO了

 

 

你可能感兴趣的:(springboot爬坑日记)