我的第一个Hibernate demo
其他
2018-06-21 05:14:20
阅读次数: 3
使用Hibernate的3个准备,7个步骤
准备一:导入Hibernate库(jar包)
准备二:添加配置文件 hibernate.cfg.xml准备三:添加实体类和映射文件 User.hbm.xml
User.hbm.xml:
User类:
七个步骤:
configuration--->sessionfactory--->打开session--->开始一个事务transaction--->持久化操作--->提交事务--->关闭session
第一个demo完成:
转载自blog.csdn.net/qq_39674542/article/details/80396369