How does IDEA quickly generate entity classes for database tables

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
Insert picture description here
2. Connect The database
Insert picture description here
fills in the corresponding database information according to the steps.
Insert picture description here
Finally, this is the table corresponding to the database I generated
Insert picture description here
3. Generate entity class
Select the table of entity class to be generated
Insert picture description here
Finally, the corresponding entity class is generated in the project
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_49092628/article/details/110940023