当前位置: 代码迷 >> 综合 >> 3.Hibernate首例:把hbm生成ddl
  详细解决方案

3.Hibernate首例:把hbm生成ddl

热度:30   发布时间:2024-01-17 02:47:44.0
package com.bjpowernode.hibernate;import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;/*** 将hbm生成ddl* @author Administrator**/
public class ExportDB {public static void main(String[] args) {//默认读取hibernate.cfg.xml文件Configuration cfg = new Configuration().configure();SchemaExport export = new SchemaExport(cfg);export.create(true, true);}
}

  相关解决方案