BeanDefinition scanning injection process started by Feign

Add EnableFeignClients to the startup class to enable the feign function. And the annotation imports FeignClientsRegistrar

FeignClientsRegistrar implements three interfaces: ImportBeanDefinitionRegistrar, ResourceLoaderAware, and EnvironmentAware, which are used to obtain environment and resource import bean definitions

The most important thing is that the ImportBeanDefinitionRegistrar interface has two methods for registering bean definitions

 
 

 FeignClientsRegistrar The core method of this class is registerBeanDefinitions

 
 

registerDefaultConfiguration This method contains two methods,

 

Guess you like

Origin blog.csdn.net/weixin_39355187/article/details/126232681