|
hibernate 老說沒有配方言 <property
name="dialect">org.hibernate.dialect.MySQLDialect</property> name 改成"hibernate.dialect"也不行 Hibernate-Version: 3.1.1
try { sessionFactory =
configuration.configure().buildSessionFactory();
throw new ExceptionInInitializerError(ex); 這
種方式會出現(xiàn)異常 第二種方式是針對使用properties文件配置 hiernate的寫法,使用hibernate.cfg.xml應使用第一種調用方式 或 者在hibernate.cfg.xml中加入:
<property name="current_session_context_class">thread</property>![]() |
|
|
來自: ShangShujie > 《我的圖書館》