如何在Eclipse中的Java类中查找Spring XML定义 [英] How to find Spring XML definition from Java Class in Eclipse

查看:66
本文介绍了如何在Eclipse中的Java类中查找Spring XML定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中处理一个大型Spring/Struts项目.我经常要做的一件事是浏览spring.xml文件,以便更新正在处理的类的定义.从我所在的Java类到Spring定义,似乎应该有一种一种简单的2或3单击方式.

I work on a large Spring/Struts project in Eclipse. One thing I have to do frequently is dig through the spring.xml file so that I can update the definition for the class that I am working on. It seems like there should be an easy 2 or 3 click way to go from the Java class I am in to the Spring definition.

我已经安装了SpringSource,但这似乎没有提供对我真正有用的任何东西.有谁知道这在Eclipse中是否可行以及如何做到?

I have SpringSource installed, but this doesn't seem to offer anything that's actually useful to me. Does anyone know if this is possible in Eclipse and how to do it?

奖励问题:是否可以从Eclipse中的Struts Action类跳转到其对应的struts.xml定义?

Bonus Question: is it possible to jump from a Struts Action class to it's corresponding struts.xml definition in Eclipse?

推荐答案

,只需添加spring性质.右键单击该项目,然后选择Spring Tools选项-> Add Spring Nature.这将确保eclipse使您的Java类和spring上下文保持同步.

in your eclipse project, just add the spring nature. Right click the project and select the Spring Tools option -> Add Spring Nature. This will ensure eclipse keeps your java classes and spring context in synch.

这篇关于如何在Eclipse中的Java类中查找Spring XML定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆