From cec587c289282964b2ea108af31d1a2325986c4e Mon Sep 17 00:00:00 2001 From: Geng Zhang Date: Fri, 27 Apr 2018 17:27:53 +0800 Subject: [PATCH] Change the default server port to 12200. (#55) --- .../com/alipay/sofa/rpc/common/rpc-config-default.json | 2 +- .../java/com/alipay/sofa/rpc/bolt/start/BoltServerMain.java | 3 +-- .../alipay/sofa/rpc/customfilter/CustomFilterServerMain.java | 1 + .../com/alipay/sofa/rpc/local/start/LocalBoltServerMain.java | 2 -- .../java/com/alipay/sofa/rpc/quickstart/QuickStartClient.java | 2 +- .../java/com/alipay/sofa/rpc/quickstart/QuickStartServer.java | 2 +- .../java/com/alipay/sofa/rpc/rest/start/RestServerMain.java | 2 -- 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/core/common/src/main/resources/com/alipay/sofa/rpc/common/rpc-config-default.json b/core/common/src/main/resources/com/alipay/sofa/rpc/common/rpc-config-default.json index cc704212d..e64e82232 100644 --- a/core/common/src/main/resources/com/alipay/sofa/rpc/common/rpc-config-default.json +++ b/core/common/src/main/resources/com/alipay/sofa/rpc/common/rpc-config-default.json @@ -92,7 +92,7 @@ PS:大家也看到了,本JSON文档是支持注释的,而标准JSON是不支 // 默认绑定网卡 "server.host": "0.0.0.0", // 端口段开始 - "server.port.start": 22000, + "server.port.start": 12200, // 端口段结束 "server.port.end": 65535, // 默认contextPath diff --git a/example/src/test/java/com/alipay/sofa/rpc/bolt/start/BoltServerMain.java b/example/src/test/java/com/alipay/sofa/rpc/bolt/start/BoltServerMain.java index d6aeaf098..f5a09ef4f 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/bolt/start/BoltServerMain.java +++ b/example/src/test/java/com/alipay/sofa/rpc/bolt/start/BoltServerMain.java @@ -43,8 +43,7 @@ public static void main(String[] args) { ApplicationConfig application = new ApplicationConfig().setAppName("test-server"); ServerConfig serverConfig = new ServerConfig() - // .setHost("0.0.0.0") - // .setPort(22222) + .setPort(22000) .setDaemon(false); ProviderConfig providerConfig = new ProviderConfig() diff --git a/example/src/test/java/com/alipay/sofa/rpc/customfilter/CustomFilterServerMain.java b/example/src/test/java/com/alipay/sofa/rpc/customfilter/CustomFilterServerMain.java index de10bd331..ea27eaca1 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/customfilter/CustomFilterServerMain.java +++ b/example/src/test/java/com/alipay/sofa/rpc/customfilter/CustomFilterServerMain.java @@ -47,6 +47,7 @@ public static void main(String[] args) { ApplicationConfig application = new ApplicationConfig().setAppName("test-server"); ServerConfig serverConfig = new ServerConfig() + .setPort(22000) .setDaemon(false); ProviderConfig providerConfig = new ProviderConfig() diff --git a/example/src/test/java/com/alipay/sofa/rpc/local/start/LocalBoltServerMain.java b/example/src/test/java/com/alipay/sofa/rpc/local/start/LocalBoltServerMain.java index 1c85e7714..911ca1da9 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/local/start/LocalBoltServerMain.java +++ b/example/src/test/java/com/alipay/sofa/rpc/local/start/LocalBoltServerMain.java @@ -51,12 +51,10 @@ public static void main(String[] args) { .setFile(file); ServerConfig serverConfig = new ServerConfig() - // .setHost("0.0.0.0") .setPort(22222) .setDaemon(false); ServerConfig serverConfig2 = new ServerConfig() - // .setHost("0.0.0.0") .setPort(22200) .setProtocol(RpcConstants.PROTOCOL_TYPE_BOLT) .setDaemon(false); diff --git a/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartClient.java b/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartClient.java index 5192a8afe..d6c67b475 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartClient.java +++ b/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartClient.java @@ -28,7 +28,7 @@ public static void main(String[] args) { ConsumerConfig consumerConfig = new ConsumerConfig() .setInterfaceId(HelloService.class.getName()) // 指定接口 .setProtocol("bolt") // 指定协议 - .setDirectUrl("bolt://127.0.0.1:9696"); // 指定直连地址 + .setDirectUrl("bolt://127.0.0.1:12200"); // 指定直连地址 HelloService helloService = consumerConfig.refer(); diff --git a/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartServer.java b/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartServer.java index 441090d49..1cbddd602 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartServer.java +++ b/example/src/test/java/com/alipay/sofa/rpc/quickstart/QuickStartServer.java @@ -27,7 +27,7 @@ public class QuickStartServer { public static void main(String[] args) { ServerConfig serverConfig = new ServerConfig() .setProtocol("bolt") // 设置一个协议,默认bolt - .setPort(9696) // 设置一个端口,默认12200 + .setPort(12200) // 设置一个端口,默认12200 .setDaemon(false); // 非守护线程 ProviderConfig providerConfig = new ProviderConfig() diff --git a/example/src/test/java/com/alipay/sofa/rpc/rest/start/RestServerMain.java b/example/src/test/java/com/alipay/sofa/rpc/rest/start/RestServerMain.java index 16354a9f4..74773ee8f 100644 --- a/example/src/test/java/com/alipay/sofa/rpc/rest/start/RestServerMain.java +++ b/example/src/test/java/com/alipay/sofa/rpc/rest/start/RestServerMain.java @@ -51,8 +51,6 @@ public static void main(String[] args) { */ ServerConfig serverConfig = new ServerConfig() - // .setHost("0.0.0.0") - // .setPort(22222) .setProtocol("rest") .setPort(8888) .setDaemon(false);