Hibernate Pojo Generator

Hibernate Pojo Generator

1. 用過最好用的還是MyEclipse附帶的工具…

2. 官方的hibernate tools

Hibernate Tools for Eclipse插件的安裝和使用【轉】

Hibernate Tools For Eclipse and Ant

jboss

http://www.jboss.org/tools/download.html

到這裡用update的

http://www.jboss.org/tools/download/installation/update_3_3.html

選取Hibernate Tools,應該不用全裝(吧)

下面是gen出pojo的步驟

How to Generate Hibernate Pojo Classes from DB Tables

官方的教學

http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html_single/

3.

http://hibernatepojoge.sourceforge.net/

這得編輯一個設定檔 like

Xml代码  Hibernate Pojo Generator
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>  
  2. <appconfig>  
  3.     <dbType>MYSQL</dbType>  
  4.     <driver>com.mysql.jdbc.Driver</driver>  
  5.         <jdbcConnectionString>jdbc:mysql://127.0.0.1/hbnPojoTest</jdbcConnectionString>  
  6.     <databaseIP>localhost</databaseIP>  
  7.     <databaseCatalog>someDBName</databaseCatalog>  
  8.     <databaseUsername>root</databaseUsername>  
  9.     <databasePassword>abcdefgh</databasePassword>  
  10.     <sourceTarget>D:/Workspace/yourProject</sourceTarget>  
  11.     <projectName>yourProjectName</projectName>  
  12.     <topLevel>com.yourcompany</topLevel>  
  13.     <libPath>libs</libPath>  
  14.     <schemaStrategy>PARTIAL</schemaStrategy>  
  15. </appconfig>  

相关推荐