下了个最新版本5.2.0final,然后照着网上的教程,但是发现API居然不一样了?
package com.liang.hibernate;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
/**
* 将hbm生成ddl
* @author liang
*
*/
public class ExportDB{
public static void main(String[]args){
//默认读取hibernate.cfg.xml文件
Configuration cfg = new Configuration().configure();
////生成并输出sql到文件(当前目录)和数据库
SchemaExport export = new SchemaExport(cfg);
export.create(true, true);
}
}
最新的版本的SchemaExport的构造函数是无参的?
那么我要下哪个版本的来学?
其实都是差不多的,学当然就要学最新版本,否则只会落后于时代