Feign 调用过程的Debug思路

246 阅读1分钟

Feign Debug 思路

背景

  1. Feign依赖
<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-openfeign</artifactId>
  <version>3.1.3</version>
  <scope>compile</scope>
</dependency>
  1. FeignClient示例

image.png 4. Feign问题
因为feign是使用了代理模式封装了构建请求的过程,在报错堆栈中很难直接找到问题根源和请求的真实情况。

Key

image.png