hibernate-tools详细使用教程

来源:互联网 发布:淘宝金币大转盘攻略 编辑:程序博客网 时间:2024/05/16 09:56

hibernate-tools详细使用教程

使用hibernate-tool的版本是hibernatetools-Update-2010-09-08_14-25-39-H23

 

1.在eclipse下安装好hibernate-tool插件,新建一个hibernate.cxf.xml文件

 

2.写好数据库连接配置

 

3.

 

4.

 

5.

 

6.

 

7.

8.

 

9.

 

10.

 

11.

 

12.最大的方框选择生成的文件类型,下面是生成entity

 

13.

 

14.下图生成的entity有注释是因为使用的模板不是hibernate-tools提供的,是自己修改的

 

hibernate生成注释模板下载:

hbmtemplates-201009201535.rar

 

hibernate生成中文注释乱码解决(eclipse设置为utf-8编码):

修改hibernate-tool的源码

hibernate-tools.jar

只要把hibernate-tool的hibernate-tools.jar文件替换成上面的jar包就ok了,目前只修改了oracle的中文注释乱码

原创粉丝点击