Jeremy
Jeremy

Reputation: 5435

Java Spring -- identify syntax errors at compile-time (in Eclipse)

I am new to Spring and just now learning to use it in a piece of legacy code. If I use bad syntax (as in I mistype a bean name or I use the wrong syntax to construct things like enums) then the code will compile fine.

This makes sense, since they're just XML files loaded at run-time.

For me, this is a big issue because my service can take up to 5 minutes to run, even though it compiles instantly. And there is no need for this, because all of the syntax errors can be known before the service is run. I shouldn't need an exception to know about it.

In Eclipse, is there a plugin or feature I can use to have compilation fail if my Spring syntax is invalid?

Upvotes: 1

Views: 164

Answers (1)

aviad
aviad

Reputation: 8278

Sure. Take a look at STS (Spring Tool Suite) - it is a n Eclipse special bundle for working with Spring. It has the context XML validation plugin and many other goodies.

Upvotes: 1

Related Questions