[code]
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class SchemaUtil {
public static void main(String[] args){
Configuration cfg = new Configuration().configure();
SchemaExport schemaExport= new SchemaExport(cfg);
schemaExport.create(true, true);
}
}
[/code]
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class SchemaUtil {
public static void main(String[] args){
Configuration cfg = new Configuration().configure();
SchemaExport schemaExport= new SchemaExport(cfg);
schemaExport.create(true, true);
}
}
[/code]
Hibernate模式生成工具
本文介绍了一个使用Hibernate框架自动生成数据库模式的Java工具。该工具通过Configuration类配置Hibernate,并利用SchemaExport类来创建数据库表结构。

被折叠的 条评论
为什么被折叠?



