ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml] in project root folder

后端 未结 6 1372
萌比男神i
萌比男神i 2021-01-02 09:38

I have the hibernate.cfg.xml file in the project root folder.

If I run an application containing:

SessionFactory s         


        
6条回答
  •  独厮守ぢ
    2021-01-02 10:15

    I was also facing the similar issue, and I noticed that my hibernate configuration file "hibernate.cfg.xml" was not on the required path. Hence I moved hibernate.cfg.xml into src folder and that resolved the issue.

提交回复
热议问题