使用Eclipse创建hibernate 步骤

1、右键 New -->other(Ctrl+n), 如图所示:

使用Eclipse创建hibernate 步骤

2、next 会进入到一个hibernate的视图 进行数据库的一些配置。如图:

使用Eclipse创建hibernate 步骤

3、配置好后 finish 会进入到如下图窗口:

 使用Eclipse创建hibernate 步骤

 3 选择hibernate 然后open

 使用Eclipse创建hibernate 步骤

4、然后右键创建一个reveng.xml文件 用于hibernate 根据数据库创建一个pojo的自动生成。

使用Eclipse创建hibernate 步骤 

5、选择要当前项目的src,如图所示:

使用Eclipse创建hibernate 步骤

6、创建映射类的对应的xml文件。

使用Eclipse创建hibernate 步骤

7、然后选择如图步骤生成对应的实体类 :

使用Eclipse创建hibernate 步骤

使用Eclipse创建hibernate 步骤

使用Eclipse创建hibernate 步骤