提示异常:
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.MysqlDialect
例如:
hibernate2中的net.sf.hibernate.dialect.SQLServerDialect
在hibernater3中变成了org.hibernate.dialect.SQLServerDialect我用的是hibernate4,所以配置如下:
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>