I have a java project and I am using hibernate. Here I want to put the hibernate.cfg.xml file outside the src folder, but when I configure this file, it shows a FileNotFoundException. If I put it in the src folder, that's fine. But I want to separate java src and the whole configuration file in a separate folder.
root
|____src
|____conf
|____mapping
|____(all xml file with hibernate.cfg.xml)
SessionFactory _sessionFactory = (new configuration ()). configure ("./conf/mapping/hibernate.cfg.xml"). buildSessionFactory ();
His exponential exception ...
source
share