Myeclipse中如何移出Capabilities??

64 篇文章 0 订阅
26 篇文章 0 订阅

最近做的一个web项目中使用的是struts1.3+Spring2.0+Hibernate3.2框架

托MyEclipse强大功能的福,配置非常简便

但是在CVS中不断上传、下载的过程中。却出现了一些问题

当使用在DataBaseBrowser中反向工程生成DAO的时候,无法选择SpringDAO

貌似,MyElicpse没有发现项目的Spring Capabilities.

网上有一些资料说 修改项目中的.springBeans和.myhibernatedata可以解决问题。

可是经过我的比较,和其他的可以发现Spring的项目中的文件内容并没有特别大的区别。

于是我想重新添加Sprint Capabilities,可是由于已经添加过了Spring,所以该选项没有了。

无奈之下删除Spring带的所有文件,可是还是不行

看来项目是否使用了Spring或者其他的Capabilities的信息一定是存放在某个配置文件里!

终于发现在项目根目录下有一个.project文件

打开之后内容如下

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
 <name>G8_Origin_CopyRight</name>
 <comment></comment>
 <projects>
 </projects>
 <buildSpec>
  <buildCommand>
   <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>org.eclipse.jdt.core.javabuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>org.eclipse.wst.validation.validationbuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>com.genuitec.eclipse.springframework.springbuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
 </buildSpec>
 <natures>
  <nature>com.genuitec.eclipse.springframework.springnature</nature>
  <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
  <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
  <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
  <nature>org.eclipse.jdt.core.javanature</nature>
  <nature>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</nature>
 </natures>
</projectDescription>

注意最后的natures标记中的内容

这里指示了项目中添加了哪些Capabilities,移出其中的Spring capabilities,然后再MyEclipse中重新添加就可以了。

虽然解决了问题,可是为什么Spring的信息发生了丢失仍不清楚

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值