天天看點

hibernate建立導出資料庫DDL schema

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

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

第一個true指導出sql檔案,第二個true指執行資料庫ddl.