Browse Source

[ci fw-only Java/t-io] update tio-mvc to 3.1.0 (#3908)

Green Luo 7 years ago
parent
commit
4fad65bdfe

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

@@ -10,7 +10,7 @@ These implementations use the t-io's controller.
 
 
 ## Versions
-3.0.8.v20180630-RELEASE (https://gitee.com/tywo45/t-io)
+3.1.0.v20180705-RELEASE (https://gitee.com/tywo45/t-io)
 
 ## Test URLs
 

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

@@ -8,7 +8,7 @@
 	<parent>
 		<groupId>org.t-io</groupId>
 		<artifactId>tio-http-parent</artifactId>
-		<version>3.0.8.v20180630-RELEASE</version>
+		<version>3.1.0.v20180705-RELEASE</version>
 	</parent>
 
 	<properties>

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

@@ -22,13 +22,13 @@ public class TestController {
 	
 	@RequestPath(value = "json")
 	public HttpResponse json(HttpRequest request) throws Exception {
-		request.channelContext.groupContext.useQueueSend = false;
+		request.channelContext.groupContext.setUseQueueSend(false);
 		return Resps.json(request, new Message(HELLO_WORLD));
 	}
 
 	@RequestPath(value = "plaintext")
 	public HttpResponse plaintext(HttpRequest request) throws Exception {
-		request.channelContext.groupContext.useQueueSend = true;
+		request.channelContext.groupContext.setUseQueueSend(true);
 		return Resps.bytesWithContentType(request, HELLO_WORLD_BYTES, MimeType.TEXT_PLAIN_TXT.getType());
 	}
 }

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

@@ -29,10 +29,10 @@ public class HttpServerInit {
 		String[] scanPackages = new String[] { TestController.class.getPackage().getName() };
 		Routes routes = new Routes(scanPackages);
 
-		DefaultHttpRequestHandler requestHandler = new DefaultHttpRequestHandler(httpConfig, routes);
-
+		requestHandler = new DefaultHttpRequestHandler(httpConfig, routes);
 		httpServerStarter = new HttpServerStarter(httpConfig, requestHandler);
 		serverGroupContext = httpServerStarter.getServerGroupContext();
+		serverGroupContext.setUseQueueDecode(true);
 		httpServerStarter.start();
 	}
 }