feign
2020-08-17 15:19:04 0 举报
feign
作者其他创作
大纲/内容
feign.target(target);
FeignLoadBalancer
executeWithLoadBalancer
初始化完毕
调用被@FeignClientA类接口
pom
@OverridesetResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; }
newInstance
FeignContext(feign上下文)
CachingSpringLoadBalancerFactory
FeignAutoConfigurationFeignRibbonClientAutoConfiguration
把含有@feignClient的注解的所有bean扫描到容器中
spring-cloud-starter-openfeign
LoadBalancerFeignClient
execute--->FeignLoadBalancer.RibbonRequest
注册
spring-cloud-openfeign-core
getTarget
SynchronousMethodHandler
invoke->executeAndDecode
HystrixTargeter
@Import(FeignClientsRegistrar.class)
调用完毕
registry.registerBeanDefinition
ReflectiveFeign
invoke
spring.factories
最后返回的是一个代理
getObject()
BeanDefinitionBuilder definition = BeanDefinitionBuilder .genericBeanDefinition(FeignClientFactoryBean.class);
FeignClientFactoryBean
整合ribbo实现负载均衡
@EnableFeignClients
FeignRibbonClientAutoConfiguration
FeignAutoConfiguration
Request.Options
registerFeignClient
Spring refresh()实例化
0 条评论
回复 删除
下一页