Home>Article>Java> Detailed explanation of the steps to build the hibernate framework environment

Detailed explanation of the steps to build the hibernate framework environment

零下一度
零下一度 Original
2017-06-25 10:34:00 1730browse

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  6  7  8  9 25 com.mysql.jdbc.Driver26 jdbc:mysql:///hibernate_5427 root28 123429 org.hibernate.dialect.MySQLDialect30 42 true43 true44 45 update46 47 53 454 55 thread56 57 58 61 62 63 

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn