@FeignClient(name = "feignClient", url = "${aaa.Url:http://127.0.0.1:80}", configuration = {CustFeignConfig.class})
public interface FeignClient {
@PostMapping("/service/query")
@Headers({"Connect-timeout: 60000", "Read-timeout: 60000"})
ResultObj queryPerf(@RequestBody RequestVO requestVO);
}
@Slf4j
public class FeignConfig implements RequestInterceptor {
@Override
public void apply(RequestTemplate template) {
template.header("Content-Type", "application/json;charset=utf-8");
template.header("X-APP-ID", "f3c");
template.header("X-APP-KEY", "e");
}
}
标签:FeignClient,Feign,class,header,60000,template,超时,public From: https://www.cnblogs.com/xiamingqing/p/17969023