jfinal可自动生成所有表的model,但有时项目中并不需要库中的所有表,也许仅需要几个表,生成指定model操作如下;
1.更新_Generator.java文件
gen.setMetaBuilder(new _MetaBuilder(getDataSource()));
2.创建_MetaBuilder.java
public class _MetaBuilder extends MetaBuilder {public _MetaBuilder(DataSource dataSource) {super(dataSource);}@Overrideprotected boolean isSkipTable(String tableName) {String[] tableArray = {"history"};//此处填入需要生成model的表for(int i=0;i