【发布时间】:2015-06-03 10:43:33
【问题描述】:
我的 maven 项目有问题 点击下面的链接查看 我将此添加到我的 hibernate.cfg 但没有工作
<mapping package="com.redpass.entities"/>
<mapping class="com.redpass.entities.MyReference"/>
console error
Project Explorer
hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/avocatbd</property>
<property name="connection.username">root</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- <mapping package="com.redpass.entities"/>
<mapping class="com.redpass.entities.MyReference"/> -->
</session-factory>
</hibernate-configuration>
【问题讨论】:
-
您能否添加更多详细信息,特别是您的 hibernate.cfg.xml
-
我添加了.cfg文件并点击上面的控制台错误和项目资源管理器