http://tools.jboss.org/downloads/jbosstools/neon/4.4.4.Final.html#zips
2017-12-13
我用的是 Eclipse + MySQL 5.7.14 + hibernate-release-5.2.12.Final,跟老师不同地方
MySQL 5.0 以后
连接地址后面加 &useSSL=false
方言:org.hibernate.dialect.MySQL5InnoDBDialect
hibernate5.X以上参考CSDN上贴子 http://bbs.csdn.net/topics/391955731
MySQL 5.0 以后
连接地址后面加 &useSSL=false
方言:org.hibernate.dialect.MySQL5InnoDBDialect
hibernate5.X以上参考CSDN上贴子 http://bbs.csdn.net/topics/391955731
2017-12-09
如果用myeclipse自带的hibernate3.X版本 创建Sessionfactory方法。
http://www.jianshu.com/p/e48e3a3452f3
http://www.jianshu.com/p/e48e3a3452f3
2017-12-07
我的运行出错结果为 JDBCConnectionException:coulld not open connection
2017-12-05
太赞了,听到这个声音我就放心了!!!!!!!!
太赞了,听到这个声音我就放心了!!!!!!!!
太赞了,听到这个声音我就放心了!!!!!!!!
太赞了,听到这个声音我就放心了!!!!!!!!
太赞了,听到这个声音我就放心了!!!!!!!!
5.X试试:
Student stu = new Student(2,"小明","男",new Date(),"广西");
Configuration con = new Configuration();
SessionFactory sf = con.configure().buildSessionFactory();
Session s = sf.openSession();
s.beginTransaction();
s.save(stu);
s.getTransaction().commit();
s.close();
sf.close();
Student stu = new Student(2,"小明","男",new Date(),"广西");
Configuration con = new Configuration();
SessionFactory sf = con.configure().buildSessionFactory();
Session s = sf.openSession();
s.beginTransaction();
s.save(stu);
s.getTransaction().commit();
s.close();
sf.close();
2017-11-30
最新回答 / 慕田峪3481485
用下面的方法创建 sessionFactory 对象吧;好像是版本有更新,空指针异常可能是其他方面导致的Configuration cfg = new Configuration().configure(); ServiceRegistry builder= (ServiceRegistry) new StandardServiceRegistryBuilde(). ...
2017-11-26