alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.94k stars 8.33k forks source link

spring cloud feign 使用sentinel 开起压缩,请求数据不自动解压,使用feign hystrix 可以获取结果自动解压 #1841

Open lovo1 opened 3 years ago

lovo1 commented 3 years ago

使用hystrix 压缩时,获取请求结果会自动解压,替换成sentinel 后,获取feign 调用结果,不自动解压 原hystrix 配置

` feign: hystrix: enabled: true compression: request:

  enabled: true

  mime-types: text/xml,application/xml,application/json

  min-request-size: 2048
response:

  enabled: true
  #useGzipDecoder: false

`

使用sentinel 后配置

` feign: sentinel: enabled: true compression: request:

  enabled: true

  mime-types: text/xml,application/xml,application/json

  min-request-size: 2048
response:

  enabled: true

`

lovo1 commented 3 years ago

代码格式贴出来有点错行