吴学文
2019-04-23 ed98b44ff5941be787d59a03f65fa5ff12a31b63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.java110.feign.test;
 
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
/**
 * 使用@FeignClient注解的fallback属性,指定fallback类
 * @author eacdy
 */
@FeignClient(name = "user-service", fallback = HystrixClientFallback.class)
public interface TestFeignHystrixClient {
 
  @RequestMapping("/test/sayHello")
  public String sayHello(@RequestParam("param") String param);
 
}