Add the injection point for the Provider
See gh-1100
This commit is contained in:
committed by
Stephane Nicoll
parent
6aa5931e28
commit
6aeaa1976d
@@ -5784,6 +5784,11 @@ other beans through a `Provider.get()` call. As a variant of the example above:
|
||||
public class SimpleMovieLister {
|
||||
|
||||
private Provider<MovieFinder> movieFinder;
|
||||
|
||||
@Inject
|
||||
public void setMovieFinder(Provider<MovieFinder> movieFinder) {
|
||||
this.movieFinder = movieFinder;
|
||||
}
|
||||
|
||||
public void listMovies() {
|
||||
this.movieFinder.get().findMovies(...);
|
||||
|
||||
Reference in New Issue
Block a user