美文网首页
2023-12-20服务调用 openfeign

2023-12-20服务调用 openfeign

作者: 大也 | 来源:发表于2023-12-23 18:50 被阅读0次

https://blog.csdn.net/weixin_43888891/article/details/126171740

第一步:导入OpenFeign的依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>3.1.6</version>
</dependency>
第二步:启动类需要添加@EnableFeignClients


image.png

第三步:提供者的接口


image.png

第四步:消费者调用提供者接口


image.png

日志+连接超时


image.png
image.png

相关文章

网友评论

      本文标题:2023-12-20服务调用 openfeign

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