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);
}
Hibernate数据库初始化
本文提供了一个使用Hibernate进行数据库初始化的例子。通过Configuration配置并加载Hibernate设置,然后利用SchemaExport工具创建数据库表结构。
217

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



