我有休眠配置文件如下
en<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.password">postgres</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/mining</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="hibernate.current_session_context_class">thread</property>
<mapping file="WEB-INF/mams-hibern.xml"></mapping>
</session-factory>
</hibernate-configuration>
但我得到例外
org.hibernate.MappingNotFoundException: file: WEB-INF\mams-hibern.xml not found
cfg 文件位于
project>src>hiber.cfg.xml
并且包含映射的 mams-hibern.xml 位于文件夹中
project>WebContent>WEB-INF>mams-hibern.xml
这是什么解决方案。任何人都知道请帮助我