首先 我用的是mysql的数据库  然后再spring的配置文件中做了sessionFactory的配置配置如下:
                    <value>
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/mytb
hibernate.connection.username=root
hibernate.connection.password=root
hibernate.dialect.org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
 </value>上面明明定义了数据库方言 但是老是报这个异常  在线等答案
Caused by: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection available
at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:106)