1. Overview: The hibernate framework acts on the dao layer to achieve persistent storage of data. It operates the database in an object-oriented manner.
2. Construction of the hibernate framework
1. Import all jar packages in the required folder in the lib directory.
Mysql driver package.
2. Create a database in the table.
3. Create entity class.
4. Create entity mapping file (take crm practice Customer class as an example)
Entity class name.hbm.xml
Introduction of constraints File
Create the main configuration file
hibernate.cfg.xml (under src)
1 2 5 67 8 9 25 63com.mysql.jdbc.Driver 26jdbc:mysql:///hibernate_54 27root 281234 29org.hibernate.dialect.MySQLDialect 30 42true 43true 44 45update 46 47 534 54 55thread 56 57 58 6162
The above is the detailed content of Detailed explanation of the steps to build the hibernate framework environment. For more information, please follow other related articles on the PHP Chinese website!