Class OnEndpointElementCondition
java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
org.springframework.boot.actuate.autoconfigure.OnEndpointElementCondition
- All Implemented Interfaces:
Condition
Base endpoint element condition. An element can be disabled globally through the
defaults
name or individually through the name of the element.- Since:
- 2.0.0
- Author:
- Stephane Nicoll, Madhura Bhave
-
Constructor Summary
ModifierConstructorDescriptionprotected
OnEndpointElementCondition
(String prefix, Class<? extends Annotation> annotationType) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConditionOutcome
getDefaultOutcome
(ConditionContext context, AnnotationAttributes annotationAttributes) Return the default outcome that should be used if property is not set.protected ConditionOutcome
getEndpointOutcome
(ConditionContext context, String endpointName) getMatchOutcome
(ConditionContext context, AnnotatedTypeMetadata metadata) Determine the outcome of the match along with suitable log output.Methods inherited from class org.springframework.boot.autoconfigure.condition.SpringBootCondition
anyMatches, logOutcome, matches, matches
-
Constructor Details
-
OnEndpointElementCondition
-
-
Method Details
-
getMatchOutcome
Description copied from class:SpringBootCondition
Determine the outcome of the match along with suitable log output.- Specified by:
getMatchOutcome
in classSpringBootCondition
- Parameters:
context
- the condition contextmetadata
- the annotation metadata- Returns:
- the condition outcome
-
getEndpointOutcome
-
getDefaultOutcome
protected ConditionOutcome getDefaultOutcome(ConditionContext context, AnnotationAttributes annotationAttributes) Return the default outcome that should be used if property is not set. By default this method will use the<prefix>.defaults.enabled
property, matching if it istrue
or if it is not configured.- Parameters:
context
- the condition contextannotationAttributes
- the annotation attributes- Returns:
- the default outcome
- Since:
- 2.6.0
-