2019独角兽企业重金招聘Python工程师标准>>>

org.springframework.cloud.sleuth.instrument.web.client.feign.TraceFeignClientAutoConfiguration

/**
 * {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration
 * Auto-configuration} enables span information propagation when using Feign.
 *
 * @author Marcin Grzejszczak
 * @since 1.0.0
 */
@Configuration
@ConditionalOnProperty(value = "spring.sleuth.feign.enabled", matchIfMissing = true)
@ConditionalOnClass(Client.class)
@ConditionalOnBean(Tracer.class)
@AutoConfigureBefore(FeignAutoConfiguration.class)
@AutoConfigureAfter({SleuthHystrixAutoConfiguration.class, TraceWebAutoConfiguration.class})
public class TraceFeignClientAutoConfiguration {

@Bean
    @Scope("prototype")
    @ConditionalOnClass(name = "com.netflix.hystrix.HystrixCommand")
    @ConditionalOnProperty(name = "feign.hystrix.enabled", matchIfMissing = true)
    Feign.Builder feignHystrixBuilder(BeanFactory beanFactory) {
        return SleuthHystrixFeignBuilder.builder(beanFactory);
    }

@Bean
    @ConditionalOnMissingBean
    @Scope("prototype")
    @ConditionalOnProperty(name = "feign.hystrix.enabled", havingValue = "false", matchIfMissing = false)
    Feign.Builder feignBuilder(BeanFactory beanFactory) {
        return SleuthFeignBuilder.builder(beanFactory);
    }

@Configuration
    @ConditionalOnProperty(name = "spring.sleuth.feign.processor.enabled", matchIfMissing = true)
    protected static class FeignBeanPostProcessorConfiguration {

@Bean
        FeignBeanPostProcessor feignBeanPostProcessor(TraceFeignObjectWrapper traceFeignObjectWrapper) {
            return new FeignBeanPostProcessor(traceFeignObjectWrapper);
        }

@Bean
        FeignContextBeanPostProcessor feignContextBeanPostProcessor(BeanFactory beanFactory) {
            return new FeignContextBeanPostProcessor(beanFactory);
        }
    }

@Bean
    TraceFeignObjectWrapper traceFeignObjectWrapper(BeanFactory beanFactory) {
        return new TraceFeignObjectWrapper(beanFactory);
    }
}

org.springframework.cloud.netflix.feign.FeignClientsConfiguration\

@Configuration
public class FeignClientsConfiguration {

org.springframework.cloud.netflix.feign.FeignAutoConfiguration

@Configuration
@ConditionalOnClass(Feign.class)
public class FeignAutoConfiguration {

转载于:https://my.oschina.net/xiaominmin/blog/3034510

FeignClientAutoConfiguration相关推荐

最新文章

  1. input标签内容改变的触发事件
  2. 【知识图谱】知识推理,知识图谱里最“人工智能”的一段
  3. JS面向对象--你真的理解闭包了吗?
  4. 算法设计与分析(第四周)大整数相乘 分治法【不能解决溢出问题】
  5. uboot启动流程概述_Alibaba Cloud Linux 2 LTS OS 启动优化实践
  6. 易校网校园综合跑腿小程序源码修复运营版
  7. Owner PID: 7948 Our PID: 7064
  8. SpringCloud 将服务注册到Eureka Server上
  9. Adaptive Wing Loss 论文摘要
  10. 怎么退出自适应巡航_定速巡航与自适应定速巡航到底有什么不同?
  11. 信贷系统搭建——实现登录界面与验证
  12. 诱人却非万能,理性看待Serverless的落地
  13. 句法分析-基于CKY的PCFG(概率上下文无法语法)
  14. 逻辑回归实现数字手写识别
  15. 工作站 Linux 系统下无线网卡配置
  16. 城市“断气”敲警钟 资源“价改”正逢时?
  17. blur表单验证方式
  18. 计算机网络(一)——计算机网络基础
  19. linux 桌面 修复工具下载,Redis Desktop Manager 0.9.7发布下载,Redis桌面管理工具
  20. SSH客户端中文乱码

热门文章

  1. greenplum:空值转换函数
  2. asp.net core 创建允许跨域请求的api, cors.
  3. Chapter 9:Noise-Estimation Algorithms
  4. jquery each
  5. Winform/WPF实例中的相互操作
  6. 当你用Python爬取网站遇到反爬,你应该这样做,轻松解决反爬问题
  7. python 批量下载 代码_Python + Selenium +Chrome 批量下载网页代码修改
  8. shell 开机自动执行_windows还能这么玩?开机自动念情书
  9. C++ 引用类型简介
  10. 怎么看懂别人写的单片机项目代码?