1. Right-click on the project and select New ——"other
2. Click Hibernation below to create hibernate.cfg.xml file
3. The data loaded by the database can be empty at the Session factory name, and there is no need to create a name
The database project name must be filled after the database URL
Fourth, display the hibernate window on the eclipse page
Fourth, display the hibernate window on the eclipse page
5. Right click on the project, create a reveng.xml file and click next directly
6. No need to click, just use the default method, click next
7. Create the hbm.xml file corresponding to the mapping class
8. Reversely generate the corresponding class
After the image below is complete, click apply, and then select the Exporters above
Select Domain code and Hibemate XML Mappings in the figure below