Hibernate自動生成數據庫表

所需類包如下圖: hibernate配置文件增加: <property name="hbm2ddl.auto">update</property> User類代碼如下: User配置文件如下圖: 運行後即可自動生成數據庫表,如下圖:
相關文章
相關標籤/搜索