本次修改内容 1、支持 HTTPS,用法同 tio-core ,例子如下: private static void initSsl(ServerGroupContext serverGroupContext) throws Exception { String keyStoreFile = PropKit.get("ssl.keystore", null); String trustStoreFile = PropKit.get("ssl.truststore", null); String keyStorePwd = PropKit.get("ssl.pwd", null); if (StringUtils.isNotBlank(keyStoreFile) && StringUtils.isNotBlank(trustStoreFile)) { SslConfig sslConfig = SslConfig.forServer(keyStoreFile, trustStoreFile, keyStorePwd); serverGroupContext.setSslConfig(sslConfig); } } ... HttpServerStarter httpServerStarter = new HttpServerStarter(httpConfig, requestHandler); ServerGroupContext serverGroupContext = httpServerStarter.getServerGroupContext(); initSsl(serverGroupContext); //让HTTP走TLS ... 2、http 增加 ThrowableHandler ,方便业务层统一处理异常 3、httpsession 添加创建时间 4、其它各种 pom 升级 最新 maven 坐标 <dependency> <groupId>org.t-io</groupId> <artifactId>tio-http-server</artifactId> <version>0.0.5-tio-http</version> </dependency> |