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" ......>
本文介绍了解决 Hibernate 映射异常 org.hibernate.MappingException 的方法。通常是因为持久化类与映射文件之间的路径配置不匹配导致的问题。文章提供了一个具体的案例,即 User 类及其映射文件 User.hbm.xml 的正确配置方法。
1497

被折叠的 条评论
为什么被折叠?



