急, 急 急 !!!!! 怎么关闭feign 全局的 fallBack

Blade 未结 1 1203
MrBlade
MrBlade 剑圣 2021-01-31 14:33

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

BladeFeignFallback:[com.winkey.hyproca.crm.api.CrmWeixinApi.sendRedpackage] serviceId:[winkey-hyproca-crm-server] message:[Error while extracting response for type [org.springblade.core.tool.api.R<java.lang.Boolean>] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.lang.Boolean` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Boolean` out of START_OBJECT token at [Source: (PushbackInputStream); line: 1, column: 36] (through reference chain: org.springblade.core.tool.api.R["data"])]


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

我的feign接口没有定义 fallback 于是全部走了默认的 BladeFeignFallback , 我怎么关闭这个

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


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


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

1条回答
  • 2021-01-31 23:21

    你不定义fallback,会直接报错。定义了全局fallback,会自动组装返回信息,防止报错。

    如果一定要关闭的话,BladeX-Tool修改这一段逻辑,不使用默认fallback,然后本地执行mvn clean install就行。

    image.png

    作者追问:2021-02-01 18:26

    这个问题根本原因是, data: {} --> 反序列成 Integer, Boolean 等, 这些基础对象的错误, 我看了一下源码是
    image.png
    不知道是不是这个错误

    0 讨论(0)
提交回复