[]hibernatetools tool installation and usage summary (Eclipse 3.6)

Source: Internet
Author: User

Reprint Address: http://blueblood79.iteye.com/blog/773177


Recently the project adopted the framework of flex+spring+hibernate development, although there have been many years of Java development experience, but the use of JDBC or ibatis,hibernate has been used or a girl on the car first, The online introduction said JBoss Hibernatetools tool is good, so the installation used a bit, the following is the summary of the installation use

I. Installation of the Hibernatetools tool:

1. The eclipes version used by the author is 3.6

2. Select the Help->install new software to pop up the following dialog box



Select the Add button

Enter Hibernatetools in the pop-up dialog box, address field input: http://download.jboss.org/jbosstools/updates/stable/

Click OK to save

The following selection boxes are then displayed



Tick JBoss Tools to select the Hibnernate tools below, click the Next button, then follow the prompts to complete the hibernate installation and restart Eclipse when the installation is complete

Two. Use of Hibernate tools

1. Open Hibernate view

After installation of the above tools is complete, select Window->open perspective to open the Perspective view and select Hibernate perspective

2. Add Hibernate configuration Files

In the hibernate perspective, right-click, select Add Hibernate Configuration, the dialog box pops up

Name: You can drop a

Project: Choose the project under Eclipse, many of which are new hibernate projects, but it is not necessary to choose the project you are currently working on.

DatabaseConnection: Select the New button on the right, will pop up a dialog box that lets you select the database, here is not the map, the current author is using MySQL database, so choose MySQL, click Next, If there is no corresponding driverclass under Classpath, you need to add the MySQL driver to classpath below

If you need to adjust the character set, you can set it under the Common tab.

When you are done, click the OK button.

will appear as the interface, you can see the relevant database below the table information



3. Configure the Code generation file

1. Select the Shortcut tab, drop down to select Hibernate Code Generation configurations, click the Popup Related dialog box

Select Main tab page
Name: By the way set

Console configuration: This is the configuration information set above, the author is hibernate

Output directory: Select the directory you want to manipulate

Package: Select the packages you want to manipulate

Reveng.xml: This is the focus of the configuration, mainly set to operate the table, columns and so on, the following in focus

Configuration such as:




2. Focus on Reveng.xml file:

1. Click the Setup button and select Create a new profile, which will pop up the following dialog box



If, like the author, there is no data on the left, click Refresh to display the corresponding data table information and then manipulate the table you want to generate

3. Export

Select the Exporters tab and select the appropriate file to generate, the author side is hbm.xml and the entity file

4. Click Run and the relevant file will be generated under the package you specified.

    • Size: 49.4 KB
    • Size: KB
    • Size: 67.6 KB
    • Size: 28.4 KB
    • Size: 7.9 KB
    • Size: 59.1 KB
    • Size: 53.4 KB
Share to:

[]hibernatetools tool installation and usage summary (Eclipse 3.6)

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.