Use MiddleGen to generate a database table ing file for hibernate
Source: Internet
Author: User
1: Download Middlegen-Hibernate-r5
Address: URL http://voxel.dl.sourceforge.net/sourceforge/hibernate/Middlegen-Hibernate-r5.zip
2: extract
Extract the downloaded package, such as D: Middlegen-Hibernate-r5
3: configure the database file
Enter the configdatabase subdirectory under the D: Middlegen-Hibernate-r5 Directory, select the database file you want, I am using mysql.
Change the original
<Property name = "database. driver. file" value = "$ {lib. dir}/mysql-connector-java-3.0.0-beta-bin.jar"/>
Change
<Property name = "database. driver. file" value = "$ {lib. dir}/mysql-connector-java-3.0.15-ga-bin.jar"/>
Specify both the database and user name. My configuration is as follows (the red part is the part to be modified)
<Property name = "database. script. file" value = "$ {src. dir}/SQL/$ {name}-mysql. SQL"/>
<! -- Property name = "database. driver. file" value = "$ {lib. dir}/mysql-connector-java-3.0.0-beta-bin.jar"/-->
<Property name = "database. driver. file" value = "$ {lib. dir}/mysql-connector-java-3.0.15-ga-bin.jar"/>
<Property name = "database. driver. classpath" value = "$ {database. driver. file}"/>
<Property name = "database. driver" value = "org. gjt. mm. mysql. Driver"/>
<Property name = "database. url" value = "jdbc: mysql: // localhost/hibernate"/>
<Property name = "database. userid" value = "root"/>
<Property name = "database. password" value = ""/>
<Property name = "database. schema" value = ""/>
<Property name = "database. catalog" value = ""/>
<Property name = "jboss. datasource. mapping" value = "mySQL"/>
Copy the mysql driver mysql-connector-java-3.0.15-ga-bin.jar to the D: Middlegen-Hibernate-r5lib
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.