package com.bjsxt.hibernate;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class ExportDB {
public static void main(String[] args) {
//读取hibernate.cfg.xml配置文件
Configuration cfg = new Configuration().configure();
//把对象类导成表
SchemaExport export = new SchemaExport(cfg);
//生成ddl
export.create(true, true);
}
}
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class ExportDB {
public static void main(String[] args) {
//读取hibernate.cfg.xml配置文件
Configuration cfg = new Configuration().configure();
//把对象类导成表
SchemaExport export = new SchemaExport(cfg);
//生成ddl
export.create(true, true);
}
}
浙公网安备 33010602011771号