Go to Project Structure (Ctrl+Alt+Shift+S
on my Box) → Facets → Plus sign at the top of dialog → Hibernate → and select your cfg.xml file there. hbm.xml should connect to project automatically.
Hereyou can find info about generating persistence mappings. Briefly: in View -- Tools -- persustence tools window you can right-click your persistence unit ang there generate persistence mappings.
原文链接:https://www.f2er.com/idea/295443.html