FeignClientAutoConfiguration
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相关推荐
最新文章
- input标签内容改变的触发事件
- 【知识图谱】知识推理,知识图谱里最“人工智能”的一段
- JS面向对象--你真的理解闭包了吗?
- 算法设计与分析(第四周)大整数相乘 分治法【不能解决溢出问题】
- uboot启动流程概述_Alibaba Cloud Linux 2 LTS OS 启动优化实践
- 易校网校园综合跑腿小程序源码修复运营版
- Owner PID: 7948 Our PID: 7064
- SpringCloud 将服务注册到Eureka Server上
- Adaptive Wing Loss 论文摘要
- 怎么退出自适应巡航_定速巡航与自适应定速巡航到底有什么不同?
- 信贷系统搭建——实现登录界面与验证
- 诱人却非万能,理性看待Serverless的落地
- 句法分析-基于CKY的PCFG(概率上下文无法语法)
- 逻辑回归实现数字手写识别
- 工作站 Linux 系统下无线网卡配置
- 城市“断气”敲警钟 资源“价改”正逢时?
- blur表单验证方式
- 计算机网络(一)——计算机网络基础
- linux 桌面 修复工具下载,Redis Desktop Manager 0.9.7发布下载,Redis桌面管理工具
- SSH客户端中文乱码
热门文章
- greenplum:空值转换函数
- asp.net core 创建允许跨域请求的api, cors.
- Chapter 9:Noise-Estimation Algorithms
- jquery each
- Winform/WPF实例中的相互操作
- 当你用Python爬取网站遇到反爬,你应该这样做,轻松解决反爬问题
- python 批量下载 代码_Python + Selenium +Chrome 批量下载网页代码修改
- shell 开机自动执行_windows还能这么玩?开机自动念情书
- C++ 引用类型简介
- 怎么看懂别人写的单片机项目代码?