📅  最后修改于: 2022-03-11 14:55:58.706000             🧑  作者: Mango
If you are working on IntelliJ Idea then make a folder named "resources" under src\main\java. Open Module setting of your project, select "Modules" from left and in the "sources" tab select the newly created "resources" folder and mark it as "Resources
Configuration con = new Configuration().configure("hibernate.cfg.xml");