标签:mappingexception: unknown entity
原因是:hibernate配置文件里面没加载!!!!!
在配置文件中加上报错的entity的.hbm.xml的配置即可;
加上<value>classpath*:/mappings/*.hbm.xml</value>
加之前
<!-- 批量加载系统配置管理相关hbm.xml -->
<property name="mappingLocations">
<list>
<value>classpath*:/com/ist/configure/management/vo/*.hbm.xml</value>
<value>classpath*:/com/ist/hbm/*.hbm.xml</value>
<value>classpath*:/mappings/bcms/*.hbm.xml</value>
<value>classpath*:/mappings/api/http/*.hbm.xml</value>
</list>
</property>
加之后
<!-- 批量加载系统配置管理相关hbm.xml -->
<property name="mappingLocations">
<list>
<value>classpath*:/com/ist/configure/management/vo/*.hbm.xml</value>
<value>classpath*:/com/ist/hbm/*.hbm.xml</value>
<value>classpath*:/mappings/bcms/*.hbm.xml</value>
<value>classpath*:/mappings/api/http/*.hbm.xml</value>
<value>classpath*:/mappings/*.hbm.xml</value>
</list>
</property>
MappingException: Unknown entity
标签:mappingexception: unknown entity
原文地址:http://7883830.blog.51cto.com/7873830/1765929