This sticker suitable for beginners, technical brain please detour!
One, configuration file
- First step: Establish Project Engineering, take HIBERNATE01 as an example
- Step Two: Click on the project name-->myeclipse--> Project Facets[capabilities]-->install Hibernate Facet-->yes
- appear, select Target Runtime
- Select Next
- After the package is established next
- Configuration file Complete
Ii. Generating database tables (completed on one basis)
- Create the required classes and configuration files
-
For example:
- Create a Package
- Test
-
Click Run
- Successful data table creation
Third, the data table to generate Java code (on a basis to complete)
- Open the windows--> open perspective-->myeclipse datebase Explorer to find the datasheet you need to convert
- Click on the Target data table right--->hibernate Reverse Engineering ... Select the package you want to store when you need to generate the entity.
- Select Id,mysql according to different database to choose native
- Click Finish to create the success
Hibernate configuration file, conversion between Java code and database