Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

feignclient vs resttemplate

Pragya Keshap answered on February 6, 2023 Popularity 8/10 Helpfulness 1/10

Contents


More Related Answers

  • What is RestTemplate and WebClient? What are difference between RestClient and WebClient?
  • feign vs webclient

  • feignclient vs resttemplate

    0

    Using Feign-clients over rest-templates has number of advantages. I will list down those below.

    The developer need not worry about the implementation. Just to create abstract Feign interface and few annotations - declarative principle. (If you want customized configuration, then it will hold some code)

    With Spring Cloud Eureka, Ribbon client-side load-balancer will be equipped with Feign client.

    No need to worry about the unit test, because there is no implementation from you to test. (Arguable)

    Supports Feign annotations and JAX-RS annotations.

    Highly compatible and easily configurable with Spring Cloud (Specially with Eureka server registry)

    Allows Feign client configuration via @Configuration class or application properties.

    Allows us to add interceptors. (Add interceptors via @Configuration or application properties. Alternatively can use Spring Cloud provided interceptors as well. Example - BasicAuthRequestInterceptor)

    Hystrix support for fall-back mechanism.

    Logging

    Error handling

    https://www.javamicroservices.com/feign-vs-resttemplate

    Popularity 8/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 06 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.