从表结构到项目实体类自动生成问题

-dbms-table-》---entity------java语言---------ssh架构

1.本实例说明使用资源:

  -----------开发软件-myeclipse8.6+oracle11g

2.具体操作

 1)在myeclipse8.6面板中找到点击》找到myeclipse database explorer 切换到DB Browser,右键new....  打开database driver 窗口,其中选择对应的数据库Driver template  ,填写 driver name 、connection url 、username、password,添加driver jars  之后点击test Driver按钮测试通过。实例如图:

 

 2) 新建web项目test,点击项目右键找到myeclipse->add hibernate capabilities ->next->next->选择DB driver (为之前1)配置的database driver)    finish 至此hibernate project 完成。

3) 打开1)中配置的database driver open connection找到对应的数据库实例,然后找到对应的table表,选择需要反映射的表然后右键,选择hibernate  Reverse engineering -----》在弹出的窗口中选择  2) 中完成的hibernate project  ,选择create pojo <>db table mapping information  ->选择create a hibernate mapping file (*.hbm.xml) for each database table, 选择 java data object (pojo <> db table)其中不选择 create abstract class   ,之后就  next -》  next -》  finish  完成。

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值