Hibernate
Xwin1989
这个作者很懒,什么都没留下…
展开
-
Hibernate4 buildSessionFactory过时解决方案(Annotation也是一样解决)
今天想用Hibernate4时候发现原先的buildSessionFactory已经过时,查了一下文档得到如下解决方案~public void test() { Configuration cfg = new Configuration(); cfg.configure(); ServiceRegistry sr = new ServiceRegistryBuilder().原创 2012-03-21 17:33:08 · 13720 阅读 · 7 评论 -
Hibernate4 Annotation实例
hibernate.cfg.xml 配置~ com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/test root 123456 10 true org.hibernate.dialect.MySQL5Dialect thread create 实体类package com.neal.原创 2012-03-21 19:51:57 · 7010 阅读 · 0 评论