SpringCloud---Feign

Posted anpeiyong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringCloud---Feign相关的知识,希望对你有一定的参考价值。

1、概述

    Feign is a declarative web service client.

    Feign makes writing web service clients easier.

    Feign has pluggable annotation support including Feign annotations and JAX-RS annotations.

    Feign also supports pluggable encoders and decoders.

    Spring Cloud integrates Ribbon and Eureka to provide a load balanced http client when using Feign.

2、How to Include Feign

    To include Feign in your project use the starter with group org.springframework.cloud and artifact id spring-cloud-starter-openfeign.

@SpringBootApplication
@EnableFeignClients
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}

  

以上是关于SpringCloud---Feign的主要内容,如果未能解决你的问题,请参考以下文章

SpringCloud---Feign

springcloud feign配置

SpringCloud Feign使用

SpringCloud---Feign服务调用

SpringCloud feign调用 请求头扩展

SpringCloud Feign 之 Fallback初体验