当前位置: 代码迷 >> Java Web开发 >> hibernate.cfg.xml not found,该怎么处理
  详细解决方案

hibernate.cfg.xml not found,该怎么处理

热度:30   发布时间:2016-04-12 23:23:48.0
hibernate.cfg.xml not found
文件放在/WEB-INF/src/ 下面,还是找不到…… 
 
Configuration cfg=new Configuration().configure();改成这样: 
Configuration cfg=new Configuration().configure("/WEB-INF/src/hibernate.cfg.xml"); 
 
这样写也不行。  
 
求助…… 
hibernate Java?Web

------解决方案--------------------
在eclipse中的位置: project_name/src/hibernate.cfg.xml
编译的位置: project_name/WebRoot/WEB-INF/classes/hibernate.cfg.xml
------解决方案--------------------
放在项目名下面的src文件夹下试试,而不是/WEB-INF/src/下
  相关解决方案