开发者

Using Spring (3.0.5) in Eclipse (3.6 Helios)

I just got a book from Apress (Spring Recipes), and I started开发者_如何学编程 to learn the Spring framework and now I have a problem. I followed the steps in the book to add the Spring .jar-s to the build path. Everything seems to work fine, but the code I have just doesn't work.

My question is that: do you know about a good tutorial for integrating Spring with Eclipse? I googled for a while and I only found old tutorials (from 2007-2009) which just doesn't work with Eclipse 3.6.


use STS - Spring Tool Suite. It is built-upon Eclipse IDE. http://www.springsource.com/developer/sts


STS helps hugely (you can get it from the Eclipse Marketplace for free). The features of it I particularly like? Here's a few:

As a user of XML-based configuration I love having the bean graph visualized – it's great for reports – but the content assist when filling out bean properties is invaluable, both for names and for values (i.e., it makes writing that much XML not suck too much). I imagine that if you're heavily using autowiring or Java configuration it's less useful. Refactoring support is also good (these days; it used to have bad bugs so you want to be patched up to date) and I've found that the pointcut search to be the only way to write a complex aspect without lots of round-trip testing.

But not all of STS is perfect. In particular, some of the content assist modes don't (seem to) help (me) that much, and it really only works well if you have your properties defined using public setters. Still, it helps a lot…


Apart from using STS as suggested, you can use spring and eclipse without any integration. There isn't that much an IDE integration can offer anyway (apart from autocompletion in the xml, and linking the xml to classes (inclding aop))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜