Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #49

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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 a component injects the same bean instance everywhere (unless of course you're using qualifiers or inject a provider).
For example in the `CoffeeApp`, if there were more beans that request the logger, they would get the same logger instance as `CoffeeMaker`.
In the example above, if there were more beans that request the logger, they would get 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
Loading