导出hbm to ddl 类

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

public class ExportDB {

public static void main(String[] args) {

   Configuration cfg = new Configuration().configure();
  
   SchemaExport export = new SchemaExport(cfg);
  
   export.create(true, true);

}

}
 

你可能感兴趣的:(DDL)