public class DatiController extends BaseController {
    @Inject
    Psy psy;
    public void todati() {
        String psyid = getPara("psy.id");
        psy.setId(psyid);
        List<Record> psyById = psy.getById();
        renderJson(psyById);
    }
    
    public void todati2(){
        Psy psy = getModel(Psy.class, "psy");
        List<Record> records = psy.getById();
        renderJson(records);
    }
}上边是新写法,下边是老写法
看不出来有啥好处呢??
 项目:JFinal
 
http://www.jfinal.com/doc/4-5
http://www.jfinal.com/doc/4-1