Mapping (RESOURCE) not found :和BeanFactory not initialized or already closed - call 'refresh' before access记录

1.Mapping (RESOURCE) not found :cn/sxx/model/Supplier.hbm.xml : origin(cn/sxx/model/Supplier.hbm.xml)

出错的原因是:hibernate逆向工程时自动生成xxxxr.hbm.xml文件在model包下,同时会对hibernate.cfg.xml进行更新。

其更新时xxxxr.hbm.xml的路径是model包下的路径。

但是我的所有的xxxx.hbm.xml文件都另外打包了,所以出现找不到的问题。

2.BeanFactory not initialized or already closed - call 'refresh' before access

我把ApplicationContext.xml引入web.xml文件中时把后缀名落下了。

posted @ 2019-06-25 18:00  永远没对象  阅读(377)  评论(0编辑  收藏  举报