How to find Spring XML definition from Java Class in Eclipse

邮差的信 提交于 2019-12-12 04:32:18

问题


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.

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?

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


回答1:


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.



来源:https://stackoverflow.com/questions/6309733/how-to-find-spring-xml-definition-from-java-class-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!