Skip to content

Commit

Permalink
Change the default server port to 12200. (sofastack#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjboy authored Apr 27, 2018
1 parent 5645d0e commit cec587c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HelloService> providerConfig = new ProviderConfig<HelloService>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HelloService> providerConfig = new ProviderConfig<HelloService>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void main(String[] args) {
ConsumerConfig<HelloService> consumerConfig = new ConsumerConfig<HelloService>()
.setInterfaceId(HelloService.class.getName()) // 指定接口
.setProtocol("bolt") // 指定协议
.setDirectUrl("bolt://127.0.0.1:9696"); // 指定直连地址
.setDirectUrl("bolt://127.0.0.1:12200"); // 指定直连地址

HelloService helloService = consumerConfig.refer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HelloService> providerConfig = new ProviderConfig<HelloService>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cec587c

Please sign in to comment.