日期:2014-05-16  浏览次数:20524 次

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.收工