3.2 Spring Cloud Feign advanced, combat
3.2.1 Feign works
Start 1. Check whether there @EnableFeignClients annotation configuration, and open the package scanning, scanning is @FeignClient annotation interface. After the annotation scanned by IOC beanDefinition poured into the container, to facilitate subsequent use is invoked.
In org.springframework.cloud.openfeign.FeignClientsRegistrar
class, registerFeignClients () method feign the registration operation is completed.
public void registerFeignClients(AnnotationMetadata metadata,
BeanDefinitionRegistry registry) {
ClassPathScanningCandidateComponentProvider scanner = getScanner()