t-io 3.2.2 釋出,主要是 tio-http 模組的升級
本次更新內容:
1、[tio-utils]:優化 tio 內建的 Cache 框架
2、Tio.java 部分方法調整
3、[tio-http]:HttpRequest 增加很多便捷的方法用於獲取引數
getObject(String name)
getString(String name)
getUploadFile(String name)
getInt(String name)
getShort(String name)
getLong(String name)
getDouble(String name)
getFloat(String name)
4、[tio-http]:增加和優化 forward()
org.tio.http.common.HttpRequest.forward(String)
org.tio.http.server.util.Resps.forward(HttpRequest, String)
5、[tio-http]:優化 404, 500 處理,由原來的 redirect 改為 forward,使用者體驗更棒一些
6、[tio-http]:註釋中內建 forward 欄位,用起來跟 nginx 的 rewrite 差不多
@RequestPath(value = "/{adid}", forward = "/ad/methodB")
public HttpResponse methodA(Integer adid, HttpRequest request) throws Exception {...}
外部訪問"/ad/12345",對內的處理邏輯就是"/ad/methodB?adid=12345"
7、[tio-websocket]:優化一個小的編碼問題,減少新物件的建立
最新pom
<dependency> <groupId>org.t-io</groupId> <artifactId>tio-core</artifactId> <version>3.2.2.v20181122-RELEASE</version> </dependency>
例行說明
-
ofollow,noindex">t-io官網 開放註冊功能了,目前有尚未完善的聊天功能和部落格功能,歡迎來作客留痕!