package com.test.action;
import java.util.List;
import com.jfinal.core.Controller;
import com.test.entity.Test;
public class TestController extends Controller {
public void index() {
List list = Test.dao.find("select * from test");
this.renderJson(list);
}
}
创建数据库对应实体:Test.java,继承Model,如下:
package com.test.entity;
import com.jfinal.plugin.activerecord.Model;
/**
* Generated by JFinal.
*/
@SuppressWarnings("serial")
public class Test extends Model {
public static final Test dao = new Test();
}
利用javascript读取表单数据,可以利用以下三种方法获取:
1、通过表单ID属性:var a = document.getElementByIdx_x_x("id");
2、通过表单名称属性:var b = document.getElementsByName("name");
3、直接通过表单名字获取:var c = form.content.
什么是Spring Data Mongo
Spring Data MongoDB项目对访问MongoDB的Java客户端API进行了封装,这种封装类似于Spring封装Hibernate和JDBC而提供的HibernateTemplate和JDBCTemplate,主要能力包括
1. 封装客户端跟MongoDB的链接管理
2. 文档-对象映射,通过注解:@Document(collectio
The insertion algorithm for 2-3 trees just described is not difficult to understand; now, we will see that it is also not difficult to implement. We will consider a simple representation known