首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

Myeclipse反向生成pojo及hibernate投射文件(由数据库表)

2013-03-25 
Myeclipse反向生成pojo及hibernate映射文件(由数据库表)在这之前请创建一个web工程,然后右键选择myeclipse

Myeclipse反向生成pojo及hibernate映射文件(由数据库表)
在这之前请创建一个web工程,然后右键选择myeclipse-->add hibernate capabilities



1.选择myeclipse database explorer视图
2.左侧区域new connection
3.弹出框内填写相应驱动连接信息
driver template:MYSQL Connetor
driver name: com.mysql.jdbc.Driver
connection url: jdbc:mysql://192.168.206.40:3306/ops
username: username
password:****


4.双击刚才创建的连接,就能看到数据库表信息了
5.选择自己要反向pojo及映射文件的表,右键hibernate reverse engineering
6.选择刚才创建的工程,把文件生成于刚才的目录下
6.勾上create pojo -->create a hibernate mapping file
  勾上java data object
7.收工

热点排行