From 9b21c77fe45eed93d31859d613fe0f3e7069ea84 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Thu, 18 Jul 2019 00:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E6=B5=81,=20Benchmark,=20=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/ecpark/service/usergw/config/ConfigGateway.java | 4 +++- usergw-service/src/main/resources/test-gateway3.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigGateway.java b/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigGateway.java index e62b6a1..d17afcf 100644 --- a/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigGateway.java +++ b/usergw-service/src/main/java/cn/ecpark/service/usergw/config/ConfigGateway.java @@ -248,6 +248,8 @@ public class ConfigGateway implements RouteDefinitionLocator { Object order = iter.get("order"); if (order != null) { rd.setOrder((int) order); + } else { + rd.setOrder(0); } } @@ -272,7 +274,7 @@ public class ConfigGateway implements RouteDefinitionLocator { try { rd.setUri(URI.create((String) uri)); } catch (Exception e) { - log.warn("dubbo Uri error"); + log.warn("dubbo Uri = {} error, so set uri to default value dubbo://yame", uri); rd.setUri(URI.create("dubbo://yame")); } } else { diff --git a/usergw-service/src/main/resources/test-gateway3.yaml b/usergw-service/src/main/resources/test-gateway3.yaml index abc489f..b086bd7 100644 --- a/usergw-service/src/main/resources/test-gateway3.yaml +++ b/usergw-service/src/main/resources/test-gateway3.yaml @@ -15,7 +15,7 @@ restful: # filters 必须 有predicates uri只是预期到达的地址 - RewritePath=/http/rewrite, /http/hello - id: xixi - uri: http://localhost:8888/http/xixi + uri: http://localhost:8888 order: 11 predicates: - Path=/http/xixi