随笔-29  评论-5  文章-0  trackbacks-0
package org.apple.hibernate;

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



class UserTest{ 
public static void main(String[] args) throws Exception{            
   
//配置环境,分析xml映射文件
   Configuration conf= new Configuration().addClass(User.class);
   
   
//生成并输出sql到文件(当前目录)和数据库
   SchemaExport dbExport=new SchemaExport(conf);
   dbExport.create(
truetrue);
}
posted on 2010-06-06 22:55 豪情 阅读(205) 评论(0)  编辑  收藏 所属分类: Hibernate 3

只有注册用户登录后才能发表评论。


网站导航: