Feign
2022-05-11 09:37:16 8 举报
Feign
作者其他创作
大纲/内容
FeignClientsRegistrar implements ImportBeanDefinitionRegistrar
FeignClientsConfiguration
1. feign.codec.Decoder 编解码 2. Encoder 编解码 3. SpringMvcContract 解析RequestMapping、RequestParam、RequestHeader注解 4. Retryer 重试器
EnableFeignClients
String[] basePackages() default {}; //扫描包路径Class<?>[] clients() default {};// 直接指定FeignClient类Class<?>[] defaultConfiguration() default {};
//导入FeignClientsRegistrar@Import(FeignClientsRegistrar.class)
FeignAutoConfiguration
@EnableFeignClients
@Beanpublic FeignContext feignContext() {FeignContext context = new FeignContext();context.setConfigurations(this.configurations);return context;}
0 条评论
下一页