使用FeignClient发送HTTP请求
1.添加依赖
<!-- spring cloud jar-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>

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

2.发送接口
@FeignClient(name = "**ServiceClient", url = "${url.signerUrl}" )
public interface **ServiceClient {

@RequestMapping(value = "/***", method = RequestMethod.POST)
public String ***(@RequestBody(required = true) String param);

}

3.调用接口发送数据


相关文章:

  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2021-10-03
  • 2021-08-06
  • 2021-12-26
相关资源
相似解决方案