19 lines
670 B
Java
19 lines
670 B
Java
package cn.bunny.feign;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
@FeignClient(value = "service-cloud2", path = "/api")
|
|
public interface CloudFeignClient {
|
|
|
|
// 调用时如果请求类型不同需要考虑加上 @RequestParam
|
|
@GetMapping("feignCloud2")
|
|
String getFeignCloud2(@RequestParam Long id);
|
|
|
|
@Operation(summary = "远程调用拦截token", description = "远程调用拦截token")
|
|
@GetMapping("product")
|
|
String getProduct(@RequestParam("id") Long id);
|
|
}
|