介绍:声明式http客户端

使用方法:
1.引入依赖
2.在启动类添加注解开启Feign功能
3.编写Feign客户端

@EnableFeignClients(clients = UserClient.class,defaultConfiguration = DefaultFeignConfiguration.class)
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
采用的是mvc的请求方式。
示例:

用的时候注入调用即可,非常简单好用。跟springmvc的东西一样
自定义Feign的配置:

配置Feign的两种方式;
方式一:通过配置文件方式

方式二:通过代码配置

总结:
