首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

由hbm资料生成对应的数据库文件

2012-07-08 
由hbm文件生成对应的数据库文件其实很简单:import org.hibernate.cfg.Configurationimport org.hibernate

由hbm文件生成对应的数据库文件
其实很简单:

import org.hibernate.cfg.Configuration;import org.hibernate.tool.hbm2ddl.SchemaExport;public class HH {   public static void main(String[] args) { Configuration config = new Configuration().configure();    System.out.println("Creating tables...");     SchemaExport schemaExport = new SchemaExport(config);               schemaExport.create(true, true);            }}

热点排行