feign调用返回的时候报错

Blade 已结 2 1263
1664087911
1664087911 剑圣 2021-05-14 09:03

一、该问题的重现步骤是什么?

1. 模块间feign调用,返回时报错。

2. 

3.


二、你期待的结果是什么?实际看到的又是什么?

正常返回,结果报错

Error while extracting response for type [org.springblade.core.tool.api.R<java.util.List<com.zhonghui.itf.dto.patientdto.PatientInfoRespDTO>>] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of `com.zhonghui.itf.dto.patientdto.PatientInfoRespDTO` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (''); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.zhonghui.itf.dto.patientdto.PatientInfoRespDTO` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('')

 at [Source: (PushbackInputStream); line: 1, column: 3739] (through reference chain: org.springblade.core.tool.api.R["data"]->java.util.ArrayList[5])

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

Bladex2.8.0

四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。

2条回答
  •  如梦技术
    如梦技术 (最佳回答者)
    2021-05-14 10:00

    把 PatientInfoRespDTO 的代码贴出来

    0 讨论(1)
  • 2021-05-14 17:48

    feign  get 请求   请求参数为对象时需要加注解

    @SpringQueryMap

    加上注解后没报错了

    1 讨论(0)
提交回复