Closed
Description
Dave Syer opened SPR-16973 and commented
It's nice that Spring supports this kind of idiom for lazy initialization of Bar
:
@Bean
public Foo foo(Provider<Bar> bar) {
return new Foo(bar);
}
@Bean
@Lazy
public Bar bar() {
return new Bar("bar");
}
It would be nice if it supported Supplier
in place of Provider
especially now that Java 8 is the baseline.
Affects: 5.0.7
Issue Links:
- Introduce Stream support in PropertySources and PropertyValues [SPR-16894] #21433 Introduce Stream support in PropertySources and PropertyValues
- Programmatic ObjectProvider retrieval through BeanFactory API [SPR-17075] #21613 Programmatic ObjectProvider retrieval through BeanFactory API