Annotation Type ConditionalOnAnyProperty
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Documented
@Conditional(com.azure.spring.cloud.autoconfigure.condition.OnAnyPropertyCondition.class)
public @interface ConditionalOnAnyProperty
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe string representation of the expected value for the properties.boolean
Specify if the condition should match if the property is not set.String[]
The name of the properties to test.A prefix that should be applied to each property.String[]
The prefixes that should be applied to each property.String[]
Alias forname()
.
-
Element Details
-
value
String[] valueAlias forname()
.- Returns:
- the names
- Default:
- {}
-
prefix
String prefixA prefix that should be applied to each property. The prefix automatically ends with a dot if not specified. A valid prefix is defined by one or more words separated with dots (e.g."spring.cloud.azure"
).- Returns:
- the prefix
- Default:
- ""
-
prefixes
String[] prefixesThe prefixes that should be applied to each property. The prefixes automatically ends with a dot if not specified. A valid prefix is defined by one or more words separated with dots (e.g."spring.cloud.azure"
).- Returns:
- the prefix array
- Default:
- {}
-
name
String[] nameThe name of the properties to test. If a prefix has been defined, it is applied to compute the full key of each property. For instance if the prefix is"spring.cloud.azure"
and one value is"my-value"
, the full key would be"spring.cloud.azure.my-value"
Use the dashed notation to specify each property, that is all lower case with a "-" to separate words (e.g.
"my-long-property"
).- Returns:
- the names
- Default:
- {}
-
havingValue
String havingValueThe string representation of the expected value for the properties. If not specified, the property must not be equal tofalse
.- Returns:
- the expected value
- Default:
- ""
-
matchIfMissing
boolean matchIfMissingSpecify if the condition should match if the property is not set. Defaults tofalse
.- Returns:
- should match if the property is missing
- Default:
- false
-