天天看點

SpringCloud之OpenFegin微服務調用

什麼是Fegin

Feign是一個聲明式的Web Service用戶端。它的出現使開發Web Service用戶端變得很簡單。使用Feign隻需要建立一個接口加上對應的注解,比如:FeignClient注解。Feign有可插拔的注解,包括Feign注解和JAX-RS注解。

Feign也支援編碼器和解碼器,Spring Cloud Open Feign對Feign進行增強支援Spring MVC注解,可以像Spring Web一樣使用HttpMessageConverters等。

Feign是一種聲明式、模闆化的HTTP用戶端。在Spring Cloud中使用Feign,可以做到使用HTTP請求通路遠端服務,就像調用本地方法一樣的,開發者完全感覺不到這是在調用遠端方法,更感覺不到在通路HTTP請求。

使用Ribbon進行微服務調用,當有同一接口多處調用的情況,那麼我們需要在每個調用建立Ribbon,這樣無疑造成了重複的工作量,Fegin是在Ribbon的基礎上進一步封裝,有Fegin來幫助我們定義和實作依賴服務接口的定義,在Fegin的實作下,我們隻需建立一個一個接口,通過注解的方式進行配置,即可實作對服務提供方的接口綁定,這樣無疑大大簡化了工作。

Fegin和OpenFegin的差別

Fegin OpenFegin
Fegin是Spring Cloud元件中一個輕量級restful風格的HTTP服務用戶端;Fegin内置了Ribbon,用來做用戶端的負載均衡,去調用服務注冊中心的服務。Fegin的使用方式是:使用Fegin的注解定義接口,通過配置就可以調用服務注冊中心的服務 OpenFegin是Spring Cloud在Fegin的基礎上支援了SpringMVC注解,可以直接解析例如:@RequestMapping的接口,并通過動态代理的方式産生實作類,實作類中做負載均衡并調用服務
spring-cloud-starter-feign spring-cloud-starter-openfeign

OpenFeign的詳細功能

1.可插拔的注解支援,包括Feign注解和JAX-RS注解。

2.支援可插拔的HTTP編碼器和解碼器(Gson,Jackson,Sax,JAXB,JAX-RS,SOAP)。

3.支援Hystrix和它的Fallback。

4.支援Ribbon的負載均衡(内置)。

5.支援HTTP請求和響應的壓縮。

6.靈活的配置:基于 name 粒度進行配置

7.支援多種用戶端:JDK URLConnection、apache httpclient、okhttp,ribbon)

8.支援日志

9.支援錯誤重試

10.url支援占位符

11.可以不依賴注冊中心獨立運作

使用OpenFegin實作微服務接口調用

  • pom.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>cloud2020</artifactId>
    <groupId>com.zjf.study</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>cloud-consumer-feign-order80</artifactId>

  <dependencies>
    <dependency><!-- 引用自己定義的api通用包,可以使用Payment支付Entity -->
      <groupId>com.zjf.study</groupId>
      <artifactId>com-api-commons</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <!-- openfeign -->
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>
    <!--監控-->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <!--eureka client-->
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <!--熱部署-->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
           
  • yml配置
server:
  port: 80

spring:
  application:
    name: cloud-consumer-feign-order80

eureka:
  client:
    # false 表示不向注冊中心注冊自己(用戶端需要向服務端注冊自己)
    register-with-eureka: true
    # false 表示自己就是注冊中心, 我的職責是去維護服務執行個體,并不需要去檢索服務
    fetch-registry: true
    service-url:
      #defaultZone: http://localhost:7001/eureka/  連接配接單機版eureka
      # 設定與 Eureka Server 互動的位址查詢服務和注冊服務都需要依賴的這個位址,這裡連接配接的是eureka叢集
      defaultZone: http://localhost:7001/eureka/,http://eureka7002.com:7002/eureka/
  instance:
      #配置Eureka顯示主機名
      instance-id: feign-order80
      #顯示主機IP位址
      prefer-ip-address: true
           

-主啟動類,加上@EnableFeignClients注解

/**
 * @author 張江豐
 * @version 9:58
 *
 */
@SpringBootApplication
@EnableEurekaClient
@EnableDiscoveryClient
@EnableFeignClients
public class FeginOrderMain80 {

  public static void main(String[] args) {
    SpringApplication.run(FeginOrderMain80.class,args);
  }

}
           

@EnableEurekaClient:聲明目前服務是Eureka用戶端

@EnableDiscoveryClient:用于微服務發現

@EnableFeignClients:聲明目前服務是Fegin用戶端

-OpenFegin接口,支援MVC注解

/**
 * @author 張江豐
 * @version ${Date} 10:07
 * @FeignClient 類似于webServce使用方法,value指定微服務提供者名稱,如果不是微服務通過url配置通路ip位址
 * Fegin是針對于Ribbon的進一步封裝,Ribbon是基于http協定的,如果服務消費方多個controller需要微服務調用,那麼需要配置多個Ribbon。
 * 使用Fegin可以簡化微服務調用,由我們自己定義微服務提供者,同時在Fegin聲明的接口中配置多個服務接口,統一通過Fegin調用微服務提供者。
 */
@Component
@FeignClient(value = "http://CLOUD-PAYMENT-SERVICE")
public interface FeginService {

  @GetMapping(value = "/payment/lb")
  public String getPaymentLB();

  @GetMapping(value = "/payment/feign/timeout")
  public String paymentFeignTimeout();

}
           
  • controller引入OpenFegin,進行微服務調用
/**
 * @author 張江豐
 * @version 10:09
 *
 */
@RestController
@Slf4j
public class FeginController {

  @Autowired
  private FeginService feginService;

  @GetMapping("/consumer/payment/lb")
  public CommonResult<String> getLb(){
    String paymentLB = feginService.getPaymentLB();
    return new CommonResult(200,"目前服務端口:"+paymentLB);
  }

  @GetMapping(value = "/consumer/payment/feign/timeout")
  public String paymentFeignTimeout() {
    //openfeign-ribbon 用戶端預設等待1S
    return  feginService.paymentFeignTimeout();
  }

}
           
  • 叢集中的微服務提供者,無需做其他配置,提供通路接口即可
@GetMapping(value = "/payment/lb")
  public String getPaymentLB() {
    return serverPort;
  }

  @GetMapping(value = "/payment/feign/timeout")
  public String paymentFeignTimeout() {
    try {
      TimeUnit.SECONDS.sleep(3);
    } catch (Exception e){
      e.printStackTrace();
    } finally {
      return serverPort;
    }
  }
           
  • 調用服務接口測試,服務提供者8001,8002端口

    由于OpenFegin内置了Ribbon,進行微服務調用時預設使用Ribbon的輪詢政策,是以服務端口8001;8002會輪流出現,可以通過配置檔案定義Ribbon的輪詢政策

    SpringCloud之OpenFegin微服務調用

OpenFegin的逾時控制

如果使用Fegin進行微服務調用,當服務接口出現延遲;卡頓等情況,OpenFegin會觸發逾時,預設觸發逾時1m。

  • 測試逾時接口,服務提供方會休眠3m
@GetMapping(value = "/payment/feign/timeout")
  public String paymentFeignTimeout() {
    try {
      TimeUnit.SECONDS.sleep(3);
    } catch (Exception e){
      e.printStackTrace();
    } finally {
      return serverPort;
    }
  }
           
  • Fegin用戶端,調用逾時接口
/**
 * @author 張江豐
 * @version 10:09
 *
 */
@RestController
@Slf4j
public class FeginController {

  @Autowired
  private FeginService feginService;

  @GetMapping("/consumer/payment/lb")
  public CommonResult<String> getLb(){
    String paymentLB = feginService.getPaymentLB();
    return new CommonResult(200,"目前服務端口:"+paymentLB);
  }

  @GetMapping(value = "/consumer/payment/feign/timeout")
  public String paymentFeignTimeout() {
    //openfeign-ribbon 用戶端預設等待1S
    return  feginService.paymentFeignTimeout();
  }

}

           
  • 接口通路報錯,出現錯誤頁面
    SpringCloud之OpenFegin微服務調用
    OpenFegin觸發逾時錯誤,主要是因為內建的Ribbon自身通路逾時預設是1m,可自定義配置Ribbon建立連接配接和通路資源等待時間
#設定feign用戶端逾時時間(OpenFeign預設支援ribbon)
ribbon:
 #指的是建立連接配接所用的時間,适用于網絡狀況正常的情況下,兩端連接配接所用的實際
  ConnectTimeout: 60000
  #指的是建立連接配接後從伺服器讀取到可用資源所用的時間
  ReadTimeout: 60000
           

OpenFegin通信日志

Feign提供了日志列印功能,我們可以通過配置來調整日志級别,進而了解Feign中Http請求的細節,說白了就是對Feign接口調用情況進行監控和輸出。

  • Fegin的日志級别
  1. NONE:不輸出任何通信日志
  2. BASIC:隻包含URL,請求方法,狀态碼,執行時間
  3. HEADERS:在BASIC基礎上額外包含請求和響應頭
  4. FULL:包含請求與相應内容最完整的資訊

    注意:針對某個微服務設定了通信日志輸出級别(那麼該輸出級别就為最進階别也是最終級别)

    在日常開發中可以使用FULL 一般推薦使用BASIC/HEADERS

  • Fegin日志輸出配置

    方式一:yml配置

#設定Fegin的日志級别(全局)
feign:
  client:
    config:
      default:
        loggerLevel: FULL
        #針對某個Fegin接口的微服務設定輸出級别(設定局部的優先級别是最高的)
      CLOUD-PAYMENT-SERVICE:
        loggerLevel: FULL

logging:
  level:
    #針對指定的類設定以什麼級别監控,輸出日志
    com.zjf.study.cloud.service.FeginService: debug
           

方式二:配置Bean+yml配置的方式指定

/**
 * @author 張江豐
 * @version 11:29
 *
 */
@Configuration
public class FeginConfig {

  /**
   * 設定Fegin日志級别
   * @return
   */
  @Bean
  Logger.Level feignLoggerLevel() {
    return  Logger.Level.FULL;
  }
           
logging:
  level:
    #針對指定的類設定以什麼級别監控,輸出日志
    com.zjf.study.cloud.service.FeginService: debug
           
  • 通路微服務接口,日志輸出
2020-08-19 17:45:44.230  INFO 1320 --- [  restartedMain] com.zjf.study.cloud.FeginOrderMain80     : No active profile set, falling back to default profiles: default
2020-08-19 17:45:45.071  WARN 1320 --- [  restartedMain] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.
2020-08-19 17:45:45.184  INFO 1320 --- [  restartedMain] o.s.cloud.context.scope.GenericScope     : BeanFactory id=409d6631-451e-35a0-8820-65d122d6974e
2020-08-19 17:45:45.725  INFO 1320 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 80 (http)
2020-08-19 17:45:45.734  INFO 1320 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-08-19 17:45:45.734  INFO 1320 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.29]
2020-08-19 17:45:45.848  INFO 1320 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-08-19 17:45:45.848  INFO 1320 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1598 ms
2020-08-19 17:45:45.918  WARN 1320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-08-19 17:45:45.919  INFO 1320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-08-19 17:45:45.928  INFO 1320 --- [  restartedMain] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: c[email protected]
2020-08-19 17:45:47.677  WARN 1320 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : Unable to start LiveReload server
2020-08-19 17:45:47.801  WARN 1320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-08-19 17:45:47.801  INFO 1320 --- [  restartedMain] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-08-19 17:45:47.920  INFO 1320 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-08-19 17:45:50.950  WARN 1320 --- [  restartedMain] ockingLoadBalancerClientRibbonWarnLogger : You already have RibbonLoadBalancerClient on your classpath. It will be used by default. As Spring Cloud Ribbon is in maintenance mode. We recommend switching to BlockingLoadBalancerClient instead. In order to use it, set the value of `spring.cloud.loadbalancer.ribbon.enabled` to `false` or remove spring-cloud-starter-netflix-ribbon from your project.
2020-08-19 17:45:50.985  INFO 1320 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-08-19 17:45:51.012  INFO 1320 --- [  restartedMain] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2020-08-19 17:45:51.044  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2020-08-19 17:45:51.144  INFO 1320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2020-08-19 17:45:51.144  INFO 1320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2020-08-19 17:45:51.255  INFO 1320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2020-08-19 17:45:51.255  INFO 1320 --- [  restartedMain] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2020-08-19 17:45:51.411  INFO 1320 --- [  restartedMain] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application is null : false
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2020-08-19 17:45:52.363  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2020-08-19 17:45:52.505  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : The response status is 200
2020-08-19 17:45:52.507  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2020-08-19 17:45:52.510  INFO 1320 --- [  restartedMain] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2020-08-19 17:45:52.513  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1597830352512 with initial instances count: 2
2020-08-19 17:45:52.515  INFO 1320 --- [  restartedMain] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application CLOUD-CONSUMER-FEIGN-ORDER80 with eureka with status UP
2020-08-19 17:45:52.515  INFO 1320 --- [  restartedMain] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1597830352515, current=UP, previous=STARTING]
2020-08-19 17:45:52.517  INFO 1320 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CLOUD-CONSUMER-FEIGN-ORDER80/feign-order80: registering service...
2020-08-19 17:45:52.557  INFO 1320 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_CLOUD-CONSUMER-FEIGN-ORDER80/feign-order80 - registration status: 204
2020-08-19 17:45:52.563  INFO 1320 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 80 (http) with context path ''
2020-08-19 17:45:52.564  INFO 1320 --- [  restartedMain] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 80
2020-08-19 17:45:53.986  INFO 1320 --- [  restartedMain] com.zjf.study.cloud.FeginOrderMain80     : Started FeginOrderMain80 in 13.791 seconds (JVM running for 15.739)
2020-08-19 17:46:16.917  INFO 1320 --- [p-nio-80-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-08-19 17:46:16.917  INFO 1320 --- [p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-08-19 17:46:16.924  INFO 1320 --- [p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 6 ms
2020-08-19 17:46:16.952 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] ---> GET http://CLOUD-PAYMENT-SERVICE/payment/lb HTTP/1.1
2020-08-19 17:46:16.952 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] ---> END HTTP (0-byte body)
2020-08-19 17:46:17.089  INFO 1320 --- [p-nio-80-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: CLOUD-PAYMENT-SERVICE.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-08-19 17:46:17.118  INFO 1320 --- [p-nio-80-exec-1] c.n.u.concurrent.ShutdownEnabledTimer    : Shutdown hook installed for: NFLoadBalancer-PingTimer-CLOUD-PAYMENT-SERVICE
2020-08-19 17:46:17.119  INFO 1320 --- [p-nio-80-exec-1] c.netflix.loadbalancer.BaseLoadBalancer  : Client: CLOUD-PAYMENT-SERVICE instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=CLOUD-PAYMENT-SERVICE,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2020-08-19 17:46:17.127  INFO 1320 --- [p-nio-80-exec-1] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater
2020-08-19 17:46:17.147  INFO 1320 --- [p-nio-80-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: CLOUD-PAYMENT-SERVICE.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-08-19 17:46:17.149  INFO 1320 --- [p-nio-80-exec-1] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client CLOUD-PAYMENT-SERVICE initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=CLOUD-PAYMENT-SERVICE,current list of Servers=[172.23.200.33:8002],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:172.23.200.33:8002;	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.clo[email protected]
2020-08-19 17:46:17.221 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] <--- HTTP/1.1 200 (268ms)
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] connection: keep-alive
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] content-length: 4
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] content-type: text/plain;charset=UTF-8
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] date: Wed, 19 Aug 2020 09:46:17 GMT
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] keep-alive: timeout=60
2020-08-19 17:46:17.222 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] 
2020-08-19 17:46:17.223 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] 8002
2020-08-19 17:46:17.224 DEBUG 1320 --- [p-nio-80-exec-1] c.zjf.study.cloud.service.FeginService   : [FeginService#getPaymentLB] <--- END HTTP (4-byte body)
2020-08-19 17:46:18.131  INFO 1320 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty  : Flipping property: CLOUD-PAYMENT-SERVICE.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647