在搭建框架时候,使用的myeclipse,直接使用快捷方式进行框架JAR包的引用,在进行hibernate逆向生成的时候,没有在applicationContext.xml文件中进行entity映射,会出现以下问题
nested exception is org.hibernate.MappingException:
在applicationContext.xml加入以下代码:
<property name="mappingResources">
<list>
<value>xxx.hbm.xml</value>
<value>xxx.hbm.xml</value>
</list>
</property>
代码中xxx为自己项目的dao包路径