问题:This wizard generates Hibernate 3.0 OR mappings(*.hbm.xml),The project you selected is a hibernate 2 project.Execution of this wizard may produce incompatible mapping files.
原因是:工程中未Add Hibernate capabilities或添加hibernate 能力的时候没有选定版本
步骤:右键工程->Myeclipse->Add Hibernate capabilities,在Hibernate Specification中选择Hibernate3.2
然后next->finish。添加spring能力也是这么做
最后就可以选择表做反向工程啦!
注意:选择做反向工程的表,一定要设置主键,不然会单独为该表主键生成一个类
,其实也不影响,因为我的spring ,hibernate 的jar包不是按照上面的方法导入的,继续就可以。