使用内部Feign,出现[com.mydao.tourist.base.BaseResult<java.util.List<com.mydao.tourist.fegin.dto.ESGroupSql

异常描述:

org.springframework.web.client.RestClientException: Error while extracting response for type [com.mydao.tourist.base.BaseResult<java.util.List<com.mydao.tourist.fegin.dto.ESGroupSqlRespVo>>] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: Invalid JSON input: Cannot deserialize instance of `java.util.ArrayList<com.mydao.tourist.fegin.dto.ESGroupSqlRespVo>` out of VALUE_STRING token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList<com.mydao.tourist.fegin.dto.ESGroupSqlRespVo>` out of VALUE_STRING token
 at [Source: (PushbackInputStream); line: 1, column: 73] (through reference chain: com.mydao.tourist.base.BaseResult["data"])

控制台 异常:

 
 DynamicServerListLoadBalancer for client ticketing-elastic-statistics-main initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=ticketing-elastic-statistics-main,current list of Servers=[192.168.1.236:7611],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;    Instance count:1;    Active connections count: 0;    Circuit breaker tripped count: 0;    Active connections per server: 0.0;]
},Server stats: [[Server:192.168.1.236:7611;    Zone:defaultZone;    Total Requests:0;    Successive connection failure:0;    Total blackout seconds:0;    Last connection made:Thu Jan 01 08:00:00 CST 1970;    First connection made: Thu Jan 01 08:00:00 CST 1970;    Active Connections:0;    total failure count in last (1000) msecs:0;    average resp time:0.0;    90 percentile resp time:0.0;    95 percentile resp time:0.0;    min resp time:0.0;    max resp time:0.0;    stddev resp time:0.0]
]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@2383f259
2023-07-11 16:00:34 |INFO | com.netflix.config.ChainedDynamicProperty [115] | Flipping property: ticketing-elastic-statistics-main.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647

Feign

xxxxx:  代指接口服务名     跟此异常无关

APIUrl:代指接口地址     跟此异常无关

加上 红色字体的 部分即可解决 ;

consumes = "application/json; charset=UTF-8", produces = "application/json; charset=UTF-8"

/**
* @Author wzq
* @Version 1.0
* @Description //TODO ES统计中心 API
* @Date 2023/6/26
**/
@FeignClient(name = "xxxxx", configuration = FeignTokenInterceptor.class)
public interface EsStatisticsService {

/**
* ES统计的【FeignAPI】
* todo 统计数据API
* */
@PostMapping(value = "APIUrl", consumes = "application/json; charset=UTF-8", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "统计数据API", notes = "统计数据API", httpMethod = "POST")
BaseResult<List<ESGroupSqlRespVo>> categoryStatisticsDataAPI(@RequestBody CategoryStatisticsDataReqVo categoryStatisticsDataReqVo);



}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值