NLF2 ![License](https://camo.githubusercontent.com/0800de14ddc2ed0007020ae6251b78811df02ca10a44bc6ac06d2bd956b1fdb1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3445423142412e7376673f7374796c653d666c61742d737175617265)
NLF2 is a lightweight java framework.
Support since java 1.5
Usage
I suggest you to use nlf2-core v1.8.99 on Maven Central.
Release
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>nlf2-core</artifactId>
<version>1.8.99</version>
</dependency>
Snapshot
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>nlf2-core</artifactId>
<version>1.8.9-SNAPSHOT</version>
</dependency>
Download
If you will use jars in your projects, I suggest you to download latest snapshot versions with less bugs.
Example
package test;
import com.nlf.App;
import com.nlf.Bean;
import com.nlf.core.IRequest;
import com.nlf.extend.web.WebView;
import com.nlf.extend.dao.sql.SqlDaoFactory;
/**
* Controller without extends or implements
*/
public class User{
/**
* Auto mapped URL: ${ctx}/test.User/info?id=xxx
*/
public Object info(){
IRequest r = App.getRequest();
String id = r.get("id","not_empty");
Bean user = SqlDaoFactory.getDao().getSelecter().table("user").where("id",id).one();
return WebView.page("/WEB-INF/jsp/user/info.jsp").setAttribute("user",user);
}
}
Documentation
Please visit http://6tail.cn/nlfdemo