内容简介:Firefly 4.9.1 正式版新增了 OAuth2 APIs、项目脚手架生成器、CORSHandler、AsyncWebJarHandler,并修复了一些bug。项目脚手架生成器可以通过命令一键生成 Firefly Kotlin web 项目。例如:这个命令在当前目录创建了一个 Firefly Kotlin web 项目。然后在 IDE 中导入 abc-haha 目录即可运行改项目。详细命令说明请参考
Firefly 4.9.1 正式版新增了 OAuth2 APIs、项目脚手架生成器、CORSHandler、AsyncWebJarHandler,并修复了一些bug。
项目脚手架生成器
项目脚手架生成器可以通过命令一键生成 Firefly Kotlin web 项目。例如:
fireflyCli -g com.test.abc -a abc-haha -p com.test.abc -d www.abc.com -j www.abc.com
这个命令在当前目录创建了一个 Firefly Kotlin web 项目。然后在 IDE 中导入 abc-haha 目录即可运行改项目。详细命令说明请参考 CLI文档 。
OAuth2 APIs
这个版本新增了 OAuths2 协议支持,支持OAuth2四种授权模式(Authorization Code Grant, Implicit Grant, Resource Owner Password Credentials Grant, 和 Client Credentials Grant),详细说明参考 OAuth2文档
CORS handler
新增的 CORSHandler 方便Firefly web项目提供跨域访问设置。例如:
CORSConfiguration config = new CORSConfiguration();
config.setAllowOrigins(new HashSet<>(Arrays.asList("http://foo.com", "http://bar.com")));
config.setExposeHeaders(Arrays.asList("a1", "a2"));
config.setAllowHeaders(new HashSet<>(Arrays.asList("a1", "a2", "a3", "a4")));
CORSHandler corsHandler = new CORSHandler();
corsHandler.setConfiguration(config);
HTTP2ServerBuilder s = $.httpServer();
s.router().path("/cors/*").handler(corsHandler)
.router().path("/cors/foo").handler(ctx -> ctx.end("foo"))
.router().path("/cors/bar").handler(ctx -> {
JsonObject jsonObject = ctx.getJsonObjectBody();
Map<String, Object> map = new HashMap<>(jsonObject);
map.put("bar", "x1");
ctx.writeJson(map).end();
})
.listen(host, port);
更新日志:
-
新增 OAuth2 APIs
-
新增 CLI 代码生成器
-
新增 AsyncWebJarHandler
-
新增 JsonProperty Annotation 用来映射 json 字段和 javabean 中的字段
-
HTTP, WebSocket, and DB Kotlin asynchronous APIs 新增 timeout 参数
-
新增 CORSHandler
-
RoutingContext 新增 createSession 方法
-
RoutingContext 新增 asyncNext suspend 方法
-
新增图像处理组件
-
修正网络框架输出很大的数据时数据错乱问题
-
修正 JsonStringReader.readLong() 读取空白字符串异常问题
以上所述就是小编给大家介绍的《Firefly 4.9.1 正式版发布,新增项目脚手架生成器》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- Avue 1.3.7 发布,增加 temp 模板生成器脚手架
- Firefly 4.9.1 正式版发布,新增项目脚手架生成器
- Next.js 脚手架进阶 —— 扩展为全栈脚手架
- 前后端分离脚手架
- 脚手架的开发总结
- Angular脚手架开发
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Web Data Mining
Bing Liu / Springer / 2006-12-28 / USD 59.95
Web mining aims to discover useful information and knowledge from the Web hyperlink structure, page contents, and usage data. Although Web mining uses many conventional data mining techniques, it is n......一起来看看 《Web Data Mining》 这本书的介绍吧!