读书人

hibernate 横竖生成表

发布时间: 2012-10-16 09:57:37 作者: rapoo

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);}}

读书人网 >Web前端

热点推荐