1. eclipse的插件market里,搜索hibernate
tools ,安装
2. eclipse 里打开view : data source
explorer
3. 建一个 database
connections.
4.
打开view: hibernate
configurations , add configuration.里面用步骤3的连接
5.打开 customize perspective ->command groups availabilty .找到
hibernate code generation
6. 工具栏就多了一个东西。类似run configation
7. new 选择连接,选择包, setup reveng.xml
选择表
8.
选择生成什么文件,
9. run