[[代码:]]
@FeignClient(value = "eureka-client", configuration = FeignConfig.class)
public interface EurekaClientFeign {
@GetMapping(value = "/hi")
String sayHiFromClientEureka(@RequestParam(value = "name") String name);
@GetMapping(value = "/hi2")
String sayHiFromClientEureka2(@RequestParam(value = "name") String name);
}
[[说明:]]
@FeignClient(value = "eureka-client", configuration = FeignConfig.class)
value——指明要访问的服务名称
@GetMapping(value = "/hi")
value——要访问的服务中接口的名称