一、myeclipse 提供数据库管理视图(Database Explorer),管理数据库中数据
添加新的驱动
二、 为myeclipse 中project 提供hibernate支持
a、自动导入jar包
b、自动创建hibernate.cfg.xml
1、创建支持
2、导入jar包
3、自动创建hibernate.cfg.xml文件
4、添加jdbc参数
5、是否用写好的工具类
注:自动创建的cfg文件仅仅配置了基本参数,如果想另外加入,只能手动加入。
三、 根据数据表 逆向生成实体类和hbm映射文件
1、在数据管理视图中建立hibernate引擎
2、创建在domain包中的映射文件
注:hibernate3.3版本与hibernate3.6版本在使用注解开发的时候是有一定区别的
对于加载配置文件的方式
hibernate3.6:Configurationconfiguration = new Configuration().configure();
hibernate3.3:Configurationconfiguration = new AnnotationConfiguration().configure();