tio-http-server 0.0.5 发布,支持 HTTPS

栏目: 软件资讯 · 发布时间: 8年前

内容简介:本次修改内容 1、支持 HTTPS,用法同 tio-core ,例子如下: private static void initSsl(ServerGroupContext serverGroupContext) throws Exception { String keyStoreFile = PropKit.get("ssl.ke...

本次修改内容

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>

【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Imperfect C++中文版

Imperfect C++中文版

威尔逊 / 荣耀、刘未鹏 / 人民邮电出版社 / 2006-1 / 75.0

汇集实用的C++编程解决方案,C++虽然是一门非凡的语言,但并不完美。Matthew Wilson使用C++十年有余,其间发现C++存在一些固有的限制,需要一些颇具技术性的工作进行弥补。本书不仅指出了C++的缺失,更为你编写健壮、灵活、高效、可维护的代码提供了实用的技术和工具。Wilson向你展示了如何克服C++的复杂性,穿越C++庞大的范式阵列。夺回对代码的控制权,从而获得更理想的结果。一起来看看 《Imperfect C++中文版》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具