First, install Hibernate Tools
1. help–> Install New software ...
2. Get the online installation address from this website: http://tools.jboss.org/downloads/jbosstools/neon/4.4.4.Final.html#update_site
Online Installation Address: http://download.jboss.org/jbosstools/neon/stable/updates/
3. Add–> stick in the above online installation address, tick the part you need, here you just need to install Hibernate tools:
4. All the way next, accept, waiting for download and installation complete.
Second, how to use Hibernate Tools 1. Create a Hibernate.cfg.xml file
New–> other–> Hibernate, select Hibernate Configuration File (cfg.xml)
Select the location you want to store, next:
Note that the dialect here to choose MySQL5, because mysql5.0 and before there are many different, the use of the dialect is different, choose the wrong back will leave the pit:
Finish.
2. Generating an mapping XML file from an object
Select the package that contains the object, or the class, and the last generated mapping file will be under the same path as the object:
Finish.
.
Eclipse installs Hibernate Tools