hibernate 反正生成表

<property name="hbm2ddl.auto">update</property>



package a;

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

public class ExportDB {
	public static void main(String[] args) {
		Configuration configuration = new Configuration().configure();

		SchemaExport schemaExport = new SchemaExport(configuration);
		schemaExport.create(true, true);
	}
}

你可能感兴趣的:(Hibernate)