我有一个java项目,我使用的是hibernate.The,这里我想把hibernate.cfg.xml文件放在"src“文件夹之外,但是当我配置这个文件时,它显示的是FileNotFoundException|____mapping
|____(all xml file with hibernate.cfg.xml/conf/mapping/hibernate.cfg.xml").buildSessi
如何将属性从hibernate.cfg.xml作为字符串加载到我的java程序?我想用这个属性创建IDataBaseTester,或者告诉我从hibernate.cfg.xml创建IDataBaseTester的另一种方法public classSessionFactory buildSessionFactory() { // Create the SessionFactory from hibernate.cfg.xml
下面的sessionFactory是从hibernate.cfg.xml文件位置的配置开始的,但是它仍然在抱怨:resources/hibernate.cfg.xml not found private static final SessionFactory sessionFactory = new Configuration().configure("resources/hibernate.cfg.xmlcom.intellij.rt.execution.application