openfeign

作者: 慵懒的阳光丶 | 来源:发表于2020-05-08 10:26 被阅读0次

一、openfeign使用步骤

1.在需要远程调用其他微服务的pom中引入openfeign依赖

   <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
            <version>2.2.1.RELEASE</version>
        </dependency>

2.在需要远程调用其他微服务的启动类上加注解开启openfeign功能

image.png

3.编写接口对应要调用的远程服务

image.png

相关文章

网友评论

      本文标题:openfeign

      本文链接:https://www.haomeiwen.com/subject/xqbxnhtx.html