Browse Source

Add the injection point for the Provider

See gh-1100
pull/1101/head
nkjackzhang 10 years ago committed by Stephane Nicoll
parent
commit
6aeaa1976d
  1. 5
      src/asciidoc/core-beans.adoc

5
src/asciidoc/core-beans.adoc

@ -5784,6 +5784,11 @@ other beans through a `Provider.get()` call. As a variant of the example above: @@ -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(...);

Loading…
Cancel
Save