Browse Source

Polish "Mention @ConditionalOnBooleanProperty in reference document"

See gh-43827
pull/43837/head
Moritz Halbritter 11 months ago
parent
commit
ac330d7e37
  1. 5
      spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc

5
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc

@ -137,8 +137,9 @@ Providing as much type information as possible in javadoc:org.springframework.co @@ -137,8 +137,9 @@ Providing as much type information as possible in javadoc:org.springframework.co
The javadoc:org.springframework.boot.autoconfigure.condition.ConditionalOnProperty[format=annotation] annotation lets configuration be included based on a Spring Environment property.
Use the `prefix` and `name` attributes to specify the property that should be checked.
By default, any property that exists and is not equal to `false` is matched, please note there is a dedicated javadoc:org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty[format=annotation] annotation for boolean property.
You can also create more advanced checks by using the `havingValue` and `matchIfMissing` attributes.
By default, any property that exists and is not equal to `false` is matched.
There is also a dedicated javadoc:org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty[format=annotation] annotation specifically made for boolean properties.
With both annotations you can also create more advanced checks by using the `havingValue` and `matchIfMissing` attributes.
If multiple names are given in the `name` attribute, all of the properties have to pass the test for the condition to match.

Loading…
Cancel
Save