Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 authored Sep 23, 2024
1 parent 3f0aaaa commit 6f34104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Instead there's the following rule:

> If two beans of the *same type* and *same qualifier* are injected by the *same component*, then they are the *same instance*.
Intuitively this means the same bean instance is injected everywhere (unless you're using qualifiers, or inject a provider).
Intuitively this means the same bean instance is injected everywhere (unless you're using qualifiers, or inject a provider). So everything is a "singleton".
In the example above, if multiple beans would request the logger, they would all get the same logger instance.

If you want to re-use a bean instance across multiple components, or multiple instances of the same component, use a `@Factory` or a `@Builder` to pass it around.
Expand Down

0 comments on commit 6f34104

Please sign in to comment.