我试图修复一个小时的问题,但似乎无济于事。我尝试了所有可用的在线方法。我正在使用Intellij IDEA。我正在使用一个Maven项目。我用以下内容创建了hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">org.h2.Driver</property>
<property name="connection.url">jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</property>
<property name="dialect">org.hibernate.dialect.H2Dialect</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">create</property>
<mapping class="User"/>
</session-factory>
</hibernate-configuration>
以下一行引发了无法解析类dialect
<property name="dialect">org.hibernate.dialect.H2Dialect</property>
我的外部库结构如下。
任何帮助将不胜感激。