hibernate笔记(一)_补充 建立表代码

建立表代码 :Export.java

package com.goby.Hibernate.bean;

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

public class ExportDB {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Configuration cfg = new Configuration().configure();
		SchemaExport se = new SchemaExport(cfg);
		se.create(true, true);
	}

}

 

你可能感兴趣的:(java,Hibernate,bean)