23,404
社区成员
发帖
与我相关
我的任务
分享
<hibernate-mapping>
<class name="com.aptech.test.pojo.Dept" table="DEPT" schema="scott">
/**
* 自动创建数据
*/
public void testInitDate(){
//读取hibernate.cfg.xml的配置信息
Configuration cft = HibernateSessionFactory.getConfiguration();
//反向工程类
SchemaExport objExport = new SchemaExport(cft);
//反向生成
objExport.create(true, true);
}