摘要: 只要在hibernate.cfg.xml添加这句话,就可以自动生成数据表 <property name="hibernate.hbm2ddl.auto">update</property> update:表示自动根据model对象来更新表结构,启动hibernate时会自动检查数据库,如果缺少表,则 阅读全文
posted @ 2017-01-06 09:52 windyHan 阅读(177) 评论(0) 推荐(0)
摘要: 实体类baseEntity.java package com.rock.cft.hibernate; import java.util.Date; import javax.persistence.GeneratedValue;import javax.persistence.GenerationT 阅读全文
posted @ 2017-01-06 09:37 windyHan 阅读(504) 评论(0) 推荐(0)