Description
Mike Youngstrom opened SPR-6079 and commented
Sometimes for @EL
and @Autowired
injection points the developer may not want the expression or the dependency evaluated at the time of injection but instead at a later point when the developer chooses to evaluate the injection. This is extremely useful for a number of reasons. Some of which are detailed in the javax.inject.Provider javadocs here.
http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Provider.html
With the added desire that the injected Provider be Serializable.
It would be nice if specifically this portion of the javax.inject functionality could be included in Spring 3.0 since it is so valuable especially when coupled with @Value
. I would be happy to provide an initial patch if there were a chance for this to make it into Spring 3.0.
Affects: 3.0 M4
Issue Links:
- Provider<...> declaration for @Value method argument fails with TypeMismatchException [SPR-12297] #16903 Provider<...> declaration for
@Value
method argument fails with TypeMismatchException
Referenced from: commits 209f43b