欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

根據(jù)Hibernte的cfg文件生成sql文件

 更新時間:2009年03月26日 11:33:13   作者:  
今天嘗試用Hibernate的配置文件生成數(shù)據(jù)庫腳本,結(jié)果居然成功了,代碼很簡單
復(fù)制代碼 代碼如下:

public void exportHibernteToSQL(){
Configuration cfg=new Configuration().configure("/hibernate.cfg.xml");
SchemaExport schemaExport = new SchemaExport(cfg);
schemaExport.setOutputFile("d:/mysql_sql.sql");
schemaExport.create(true, false);
}

注意:Hibernate的配置文件是什么數(shù)據(jù)庫方言和驅(qū)動,將生成什么數(shù)據(jù)庫腳本。

相關(guān)文章

最新評論