users@jersey.java.net

Reuse of Spring's Autowired

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 15 Aug 2008 08:15:27 +0200

Hi Martin,

[i realize you are on holiday, but i wanted to get my idea down
before i forgot it]

I wonder if we can reuse the Spring @Autowired annotation:

   org.springframework.beans.factory.annotation.Autowired

for injection of parameters of constructors and methods. i.e. we add
an injectable provider to the spring module. This would make it more
natural for Spring users than using @Inject. And i don't think it
would interfere with the use on fields because Spring will get to
those first (and Jersey will not set the field value if non-null).

Paul.