class User extends Model<User> {
public static final User dao = new User();
public String uInsert(String u_name,String u_password,String memo){
dao.set("u_name", u_name).set("u_password",u_password).set("memo", memo).save();
User.dao.deleteById(20);
List<User> user = User.dao.find("select *from userinfo");
System.out.println("--------------"+user);
return "注册成功";
}
}
这里查询数据一直出不来了数据,也没有报错
项目:JFinal
public static final User dao = new User();
改成:
public static final User dao = new User().dao();
可以避免你 dao.set(...) 操作