运行 Tomcat 时出现此错误:
原因:org.springframework.beans.factory.BeanCreationException:
在类路径资源[beans.xml]中定义名称为“sessionFactory”的bean创建错误:调用init方法失败;嵌套异常是
org.hibernate.MappingNotFoundException:资源:
com/itheima/elec/domain/ElecText.hbm.xml 未找到
但它确实存在于我的项目中:
在我的 Hibernate 配置中,如下所示:
<session-factory>
...
<mapping resource="com/itheima/elec/domain/ElecText.hbm.xml"/>
<mapping resource="com/itheima/elec/domain/ElecCommonMsg.hbm.xml"/>
</session-factory>
不知道问题出在哪里,有朋友能帮帮我吗?