You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Spring Boot provides the @ConditionalOnProperty annotation to conditionally load beans or configurations based on a single property. However, there is no built-in support for conditionally loading beans based on multiple properties in a single annotation or use multiple annotations of it. This requires developers to write custom conditions.
Introduce a new annotation, @ConditionalOnProperties, that allows developers to specify multiple @ConditionalOnProperty conditions in a single annotation. This would simplify the configuration and improve readability. Now, developer will have the option to write single condition using @ConditionalOnProperty or use @ConditionalOnProperities like the mentioned:
Thanks for the suggestion, but there is already an enhancement request open (#2541) that when fixed would effectively create the annotation you're requesting.
Currently, Spring Boot provides the
@ConditionalOnProperty
annotation to conditionally load beans or configurations based on a single property. However, there is no built-in support for conditionally loading beans based onmultiple properties
in a single annotation or use multiple annotations of it. This requires developers to write custom conditions.Introduce a new annotation,
@ConditionalOnProperties
, that allows developers to specify multiple@ConditionalOnProperty
conditions in a single annotation. This would simplify the configuration and improve readability. Now, developer will have the option to write single condition using@ConditionalOnProperty
or use@ConditionalOnProperities
like the mentioned:In spring boot we can add multiple with the same
havingValue
andmatchIfMissing
like this:The text was updated successfully, but these errors were encountered: