Skip to content

Commit

Permalink
Merge pull request #29115 from An1s9n
Browse files Browse the repository at this point in the history
* pr/29115:
  Polish reference doc

Closes gh-29115
  • Loading branch information
snicoll committed Dec 20, 2021
2 parents fbb7f12 + b704ee0 commit b26730c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ When placed on a `@Bean` method, the target type defaults to the return type of
include::{docs-java}/features/developingautoconfiguration/conditionannotations/beanconditions/MyAutoConfiguration.java[]
----

In the preceding example, the `myService` bean is going to be created if no bean of type `MyService` is already contained in the `ApplicationContext`.
In the preceding example, the `someService` bean is going to be created if no bean of type `SomeService` is already contained in the `ApplicationContext`.

TIP: You need to be very careful about the order in which bean definitions are added, as these conditions are evaluated based on what has been processed so far.
For this reason, we recommend using only `@ConditionalOnBean` and `@ConditionalOnMissingBean` annotations on auto-configuration classes (since these are guaranteed to load after any user-defined bean definitions have been added).
Expand Down

0 comments on commit b26730c

Please sign in to comment.