<property name="hbm2ddl.auto">update</property>
package a;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
public class ExportDB {
public static void main(String[] args) {
Configuration configuration = new Configuration().configure();
SchemaExport schemaExport = new SchemaExport(configuration);
schemaExport.create(true, true);
}
}
本文介绍如何利用HBM2DDL自动更新数据库结构的实现方式,通过配置文件和SchemaExport工具来创建和更新数据库模式。
1096

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



