Conditional Configuration
Conditional by Property
If the property matches the defined value then the configuration is applied.
Argument | Usage |
havingValue | The value required to activate the condition |
matchIfMissing | If true, the condition activates when the property is not defined |
Conditional by Condition Class
When the condition returns true then the configuration is applied.
Conditional by Bean
The bean is loaded only if the referenced bean has been loaded:
The bean is loaded only if the referenced bean has NOT been loaded:
Conditional by Class
The bean is loaded only if the class is in the classpath:
The bean is loaded only if the class is missing from the classpath:
Last updated