Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 authored Dec 18, 2023
1 parent 14777e6 commit dffd2b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ 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 a component injects the same bean instance everywhere (unless of course you're using qualifiers or inject a provider).
In the example above, if there were more beans that request the logger, they would get all get the same logger instance.
Intuitively this means the same bean instance is injected everywhere (unless you're using qualifiers, or inject a provider).
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.
Components will prefer using an existing bean instance over creating a new one.
Expand Down

0 comments on commit dffd2b6

Please sign in to comment.