Hibernate configuration file, conversion between Java code and database

Source: Internet
Author: User

This sticker suitable for beginners, technical brain please detour!

One, configuration file

      1. First step: Establish Project Engineering, take HIBERNATE01 as an example
      2. Step Two: Click on the project name-->myeclipse--> Project Facets[capabilities]-->install Hibernate Facet-->yes
      3. appear, select Target Runtime


      4. Select Next


      5. After the package is established next
      6. Configuration file Complete

Ii. Generating database tables (completed on one basis)

    1. Create the required classes and configuration files

    2. For example:

    3. Create a Package

    4. Test

    5. Click Run

    6. Successful data table creation

Third, the data table to generate Java code (on a basis to complete)

    1. Open the windows--> open perspective-->myeclipse datebase Explorer to find the datasheet you need to convert
    2. Click on the Target data table right--->hibernate Reverse Engineering ... Select the package you want to store when you need to generate the entity.

    3. Select Id,mysql according to different database to choose native

    4. Click Finish to create the success

Hibernate configuration file, conversion between Java code and database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.