天天看点

hibernate创建导出数据库DDL schema

schemaexport se=new schemaexport(cfg).setoutputfile("xby.sql");

se.execute(true,true,false,false);

第一个true指导出sql文件,第二个true指执行数据库ddl.