ExportDB

public class ExportDB {

	public static void main(String[] args) {
		
		//读取配置文件hibernate_cfg.xml
		Configuration cfg = new Configuration().configure();
		
		//创建SchemaExport对象
		SchemaExport export = new SchemaExport(cfg);
		
		//创建数据库表
		export.create(true, true);
		
	}
}

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