提交 73606190 authored 作者: liuhaiquan's avatar liuhaiquan

增加feign的超时时间为5秒

上级 22217248
...@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
@FeignClient(name = "msl-document") @FeignClient(name = "msl-document",configuration = PerformanceClientConfiguration.class)
public interface DocumentFeign { public interface DocumentFeign {
/** /**
......
...@@ -8,7 +8,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -8,7 +8,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "clx-performance") @FeignClient(name = "clx-performance",configuration = PerformanceClientConfiguration.class)
public interface IntegralTruckFeign { public interface IntegralTruckFeign {
@ApiOperation(value = "新增车辆") @ApiOperation(value = "新增车辆")
......
...@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@FeignClient(name = "clx-performance") @FeignClient(name = "clx-performance",configuration = PerformanceClientConfiguration.class)
public interface OrderChildFeign { public interface OrderChildFeign {
......
package com.clx.performance.feign;
import feign.Request;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class PerformanceClientConfiguration {
@Bean
public Request.Options requestOptions() {
return new Request.Options(5000, 5000);
}
}
\ No newline at end of file
...@@ -24,7 +24,7 @@ import javax.validation.constraints.NotNull; ...@@ -24,7 +24,7 @@ import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@FeignClient(name = "clx-performance") @FeignClient(name = "clx-performance",configuration = PerformanceClientConfiguration.class)
public interface PerformanceFeign { public interface PerformanceFeign {
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论