Browse Source

[ci fw-only Java/t-io] update t-io to 3.5.5 (#5133)

Green Luo 5 years ago
parent
commit
65c6c4594c

+ 1 - 1
frameworks/Java/t-io/README.md

@@ -10,7 +10,7 @@ These implementations use the t-io's controller.
 
 
 
 
 ## Versions
 ## Versions
-3.1.8.v20180818-RELEASE (https://gitee.com/tywo45/t-io)
+3.5.5.v20191010-RELEASE (https://gitee.com/tywo45/t-io)
 
 
 ## Test URLs
 ## Test URLs
 
 

+ 1 - 1
frameworks/Java/t-io/pom.xml

@@ -8,7 +8,7 @@
 	<parent>
 	<parent>
 		<groupId>org.t-io</groupId>
 		<groupId>org.t-io</groupId>
 		<artifactId>tio-http-parent</artifactId>
 		<artifactId>tio-http-parent</artifactId>
-		<version>3.2.9.v20190401-RELEASE</version>
+		<version>3.5.5.v20191010-RELEASE</version>
 	</parent>
 	</parent>
 
 
 	<properties>
 	<properties>

+ 24 - 2
frameworks/Java/t-io/src/main/java/org/tio/http/server/benchmark/TioBenchmarkStarter.java

@@ -2,13 +2,22 @@ package org.tio.http.server.benchmark;
 
 
 import java.io.IOException;
 import java.io.IOException;
 
 
-import org.tio.http.server.benchmark.init.HttpServerInit;
+import org.tio.http.common.HttpConfig;
+import org.tio.http.server.HttpServerStarter;
+import org.tio.http.server.benchmark.controller.TestController;
+import org.tio.http.server.handler.DefaultHttpRequestHandler;
+import org.tio.http.server.mvc.Routes;
+import org.tio.server.ServerTioConfig;
 
 
 /**
 /**
  * @author tanyaowu 
  * @author tanyaowu 
  * 2018年6月9日 上午10:30:45
  * 2018年6月9日 上午10:30:45
  */
  */
 public class TioBenchmarkStarter {
 public class TioBenchmarkStarter {
+	public static HttpConfig				httpConfig;
+	public static DefaultHttpRequestHandler	requestHandler;
+	public static HttpServerStarter			httpServerStarter;
+	public static ServerTioConfig			serverTioConfig;
 
 
 	/**
 	/**
 	 * @param args
 	 * @param args
@@ -16,6 +25,19 @@ public class TioBenchmarkStarter {
 	 * @throws IOException
 	 * @throws IOException
 	 */
 	 */
 	public static void main(String[] args) throws Exception {
 	public static void main(String[] args) throws Exception {
-		HttpServerInit.init();
+		httpConfig = new HttpConfig(8080, null, null, null);
+		httpConfig.setUseSession(false);
+		httpConfig.setWelcomeFile(null);
+		httpConfig.setCheckHost(false);
+		httpConfig.setCompatible1_0(false);
+
+		Routes routes = new Routes(TestController.class);
+
+		requestHandler = new DefaultHttpRequestHandler(httpConfig, routes);
+		requestHandler.setCompatibilityAssignment(false);
+		httpServerStarter = new HttpServerStarter(httpConfig, requestHandler);
+		serverTioConfig = httpServerStarter.getServerTioConfig();
+		serverTioConfig.statOn = false;
+		httpServerStarter.start();
 	}
 	}
 }
 }

+ 0 - 40
frameworks/Java/t-io/src/main/java/org/tio/http/server/benchmark/init/HttpServerInit.java

@@ -1,40 +0,0 @@
-package org.tio.http.server.benchmark.init;
-
-import org.tio.http.common.HttpConfig;
-import org.tio.http.common.handler.HttpRequestHandler;
-import org.tio.http.server.HttpServerStarter;
-import org.tio.http.server.benchmark.controller.TestController;
-import org.tio.http.server.handler.DefaultHttpRequestHandler;
-import org.tio.http.server.mvc.Routes;
-import org.tio.server.ServerGroupContext;
-
-/**
- * @author tanyaowu
- * 2017年7月19日 下午4:59:04
- */
-public class HttpServerInit {
-	public static HttpConfig httpConfig;
-
-	public static HttpRequestHandler requestHandler;
-
-	public static HttpServerStarter httpServerStarter;
-	
-	public static ServerGroupContext serverGroupContext;
-
-	public static void init() throws Exception {
-		httpConfig = new HttpConfig(8080, null, null, null);
-		httpConfig.setUseSession(false);
-		httpConfig.setWelcomeFile(null);
-		httpConfig.setCheckHost(false);
-		httpConfig.setCompatible1_0(false);
-
-		String[] scanPackages = new String[] { TestController.class.getPackage().getName() };
-		Routes routes = new Routes(scanPackages);
-
-		requestHandler = new DefaultHttpRequestHandler(httpConfig, routes);
-		httpServerStarter = new HttpServerStarter(httpConfig, requestHandler);
-		serverGroupContext = httpServerStarter.getServerGroupContext();
-		serverGroupContext.statOn = false;
-		httpServerStarter.start();
-	}
-}