Skip to content

a lightweight java framework. NLF2框架是一款原创的、低调的轻量级java框架,它无侵入、无依赖、零配置、无注解,看一点例子,你很快就能上手。

License

6tail/nlf2-maven

Repository files navigation

NLF2

NLF2 License

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.

Download

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

Contact

NLF

About

a lightweight java framework. NLF2框架是一款原创的、低调的轻量级java框架,它无侵入、无依赖、零配置、无注解,看一点例子,你很快就能上手。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages