码迷,mamicode.com
首页 > 编程语言 > 详细

SpringCloud---Feign

时间:2019-11-07 19:09:16      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:service   decode   enable   balance   ring   boot   start   and   run   

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

标签:service   decode   enable   balance   ring   boot   start   and   run   

原文地址:https://www.cnblogs.com/anpeiyong/p/11814007.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!