jurlmapJava的URL映射类库
jurlmap是一个Java类库,能够让你的Web应用程序拥有简洁,类似于REST的URL。
主要特点:
1. URL参数能够直接绑定至Bean的属性或方法的参数。
2. 配置直接采用Java编码或注释,不需要额外配置文件。
3. URL映射匹配规则简单。
4. 能够很方便集成到Web应用程序中,只要将jurlmap提供的过滤器 Filter加到项目就可以。
URL 配置方法:
protected void configure() {
// In this pattern $ means a string, which when matched
// is bound to parameter `Username` and control forwarded to profile.jsp
// Parameter will be accessible via request.getParameter()
forward("/profile.jsp", "/profile/$Username");
// Here % means integer pattern and * means until end of the pattern.
// Binds integers to parameter ArticleId and forwards to article.jsp
forward("/article.jsp", "/article/%ArticleId/*");
// When matched will send a redirect back to browser and parameters
// are appended to query string so in this case the target will
// be `/servlets/profileservlet?Username=...`
redirect("/servlets/profileservlet", "/member/$Username");
// On match creates an instanc eof LoginPage and calls it's service method
// LoginPage class implements com.pagegoblin.jurlmap.Page.
// If it is annotated with a @Deploy(url) annotation
// the we don't need to pass a url to the deploy method.
// In this case parameters are bound to bean properties or fields
// of the newly created LoginPage instance.
deploy(LoginPage.class);
}
评论
GensonJava 的 JSON 映射库
Genson是一个轻量级的Java库用来处理JSON数据,提供了完全的数据绑定和Java泛型支持。功能易于使用,快速,高度可配置,轻巧,所有这些都放入一个小罐中!全面的数据绑定和流传输支持,可实现高效
GensonJava 的 JSON 映射库
0
AchillesCassandra 的高级对象映射库
Achilles是一个开源的ApacheCassandra的高级对象映射库,相当于是客户端开发包。主要特性包括:高级Bean映射(包括复合主键、分区键、timeUUID,计数器,静态字段等…)可插入的
AchillesCassandra 的高级对象映射库
0
MotisJSON 到 NSObject 的映射库
Motis 使用 Cocoa 的 KVC 实现了智能的 JSON 到 NSObject 对象的映射。
MotisJSON 到 NSObject 的映射库
0
MotisJSON 到 NSObject 的映射库
Motis使用Cocoa的KVC实现了智能的JSON到NSObject对象的映射。示例代码:// --- User.h --- //@interface User : NSObject@propert
MotisJSON 到 NSObject 的映射库
0
oneurlC/C++的URL解析库
oneurl是一个C/C++语言开发的url解析以及标准化开源库,基于googleurl内核函数,主要功能:a.解析url,可以得到协议(scheme),主机名(host),端口(port),域名(D
oneurlC/C++的URL解析库
0