日期:2014-05-16  浏览次数:20347 次

hibernate 映射文件生成数据库表脚本

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

?

public static void main(String[] args) {
???? Configuration cfg = new Configuration().configure();
???? SchemaExport export = new SchemaExport(cfg);
???? export.create(true, true);
??}