How does IDEA quickly generate entity classes for database tables
When doing a project, it is inevitable to use a database. The size of the project determines the size of the database. Too much data in the database manually knocks on the entity class inevitably does not meet the current rhythm, so IDEA generates this function for us to quickly generate the database entity class
1. Find File->project structure in the menu bar, then select the entity class project, there is a plus sign at the top, click and select JPA, there is a Default JPA Provider option below the big box on the right, here we select Hibernate
2. Connect The database
fills in the corresponding database information according to the steps.
Finally, this is the table corresponding to the database I generated
3. Generate entity class
Select the table of entity class to be generated
Finally, the corresponding entity class is generated in the project