sh整合时可能会遇到很多问题,常见的问题之一
org.hibernate.MappingException: entity class not found
可能原因:若持久化类为:User.java
对应的hibernate映射文件为:User.hbm.xml
一般系统自动生成的映射文件为:
<hibernate-mapping>
<class name="User" table="......
.......
</hibernate-mapping>
要将class路径改为绝对路径。若User.java在包com.ssh.bean
则要改为<class name="com.ssh.bean.User" ......>
org.hibernate.MappingException: entity class not found
最新推荐文章于 2023-11-28 17:36:28 发布
本文介绍了解决 Hibernate MappingException 的方法,特别是当系统找不到指定的实体类时。通过调整映射文件中的类路径到正确的绝对路径来解决该问题。

1529





