Can Spring understand @Inject replacing Weld as a JSR-299 implementation?

Posted by Thorbjørn Ravn Andersen on Stack Overflow See other posts from Stack Overflow or by Thorbjørn Ravn Andersen
Published on 2010-06-16T17:33:27Z Indexed on 2010/06/16 17:52 UTC
Read the original article Hit count: 211

I have noticed from several web pages that apparently Spring 3.0 supports @Inject from JSR-330. As we would really like to use JSR-299 syntax for dependency injection in our libraries for both web apps and stand-alone applications, and have alternatives to Weld, it would be nice if Spring could do this.

Being a novice to Spring, I tried downloading the Spring Framework distribution and put all jars on the Eclipse build path. No Inject annotation so my existing test project using Weld did not compile.

Can this be done with Spring? What do I need to do to get it running?

(I am aware that Guice eventually will support this too. It is only in SVN for now, and if there is an official Spring release which can, that would be better.)

© Stack Overflow or respective owner

Related posts about java

Related posts about spring