在搭建框架時候,使用的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包路徑