4

Is there any way to validate spring context xml files in eclipse? Features like:

  • Validate class attribute of bean
  • Validate bean references
  • Validating with autowireing perhaps?

We're not working with annotations on current project unfortunatly. I dislike the current workflow: "deploy it and get a nullpointer for a classname typo"

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Michael Bavin
  • 3,944
  • 6
  • 31
  • 35

3 Answers3

4

Sure have a look here at Spring IDE

http://springide.org/project/wiki/SpringideInstall

It does all you requested. (not sure about the autowire).

It even auto completes bean property and references.

Paul Whelan
  • 16,574
  • 12
  • 50
  • 83
1

Try this:

Make sure you have "SpringSource Tool Suite". If not get this plugin from http://marketplace.eclipse.org/search/site/STS.

Once it is installed then go to ur project and right click on project (Right Click >> Spring Tools >> add spring nature)or follow as shown enter image description here

Once done new node will get created with name "Spring Elements". Right click on this option and click on Properties and navigate to "Bean Support" and click scan. This will show you the xml file in your project, just select and add. Now it will show you error in xml files

enter image description here

Rupesh
  • 2,627
  • 1
  • 28
  • 42
1

Spring Tools Suite http://www.springsource.com/products/sts is the official SpringSource Eclipse plugin for this sort of thing. It's also recently been submitted as part of a new project in Eclipse, so it should get integrated into either that project tooling, or even WTP. See http://www.eclipse.org/proposals/virgo/

ptomli
  • 11,730
  • 4
  • 40
  • 68