'hibernate.dialect' must be set when no Connection avalable
当连接不可用时,必须要设置Hibernate方言
搜索大多数的解决办法是:首先查看是否是数据库没启动,能不能正常连接上。启动数据库,正常连接就可以了。
当然我遇到的原因不是这个,因为我搭建的这个项目根本就没有用到数据库。
所有我就添加了一个MySQL方言,嘿,没想到这么着就成了:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
</props>
</property>
</bean>