Chinaunix首页 | 论坛 | 博客
  • 博客访问: 547647
  • 博文数量: 136
  • 博客积分: 4010
  • 博客等级: 上校
  • 技术积分: 1343
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-19 23:18
文章分类

全部博文(136)

文章存档

2011年(28)

2009年(60)

2008年(48)

我的朋友

分类: Java

2009-03-25 15:39:35

代码如下
 

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class ExportDB {

    public static void main(String[] args) {
        
        //读取hibernate.cfg.xml文件

        Configuration cfg = new Configuration().configure();
        
        SchemaExport export = new SchemaExport(cfg);
        
        export.create(true, true);
    }
}

阅读(510) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~