有时候,hbm文件被打包到jar文件中,按照网上文章配置总报错,如下:
Caused by: org.hibernate.InvalidMappingException: Could not read mapping documents from jar: cidbcommon.jar
自己反复测试,正确配置应该如下:
也就是说配置了 mappingJarLocations, 就不能再配置 mappingLocations 了,切记。
有时候,hbm文件被打包到jar文件中,按照网上文章配置总报错,如下:
Caused by: org.hibernate.InvalidMappingException: Could not read mapping documents from jar: cidbcommon.jar
自己反复测试,正确配置应该如下:
也就是说配置了 mappingJarLocations, 就不能再配置 mappingLocations 了,切记。