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
ConstructorsModifierConstructorDescriptionprotectedOnEndpointElementCondition(String prefix, Class<? extends Annotation> annotationType) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConditionOutcomegetDefaultOutcome(ConditionContext context, AnnotationAttributes annotationAttributes) Return the default outcome that should be used if property is not set.protected @Nullable ConditionOutcomegetEndpointOutcome(ConditionContext context, String endpointName) getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) Determine the outcome of the match along with suitable log output.Methods inherited from class SpringBootCondition
anyMatches, logOutcome, matches, matches
-
Constructor Details
-
OnEndpointElementCondition
-
-
Method Details
-
getMatchOutcome
Description copied from class:SpringBootConditionDetermine the outcome of the match along with suitable log output.- Specified by:
getMatchOutcomein classSpringBootCondition- Parameters:
context- the condition contextmetadata- the annotation metadata- Returns:
- the condition outcome
-
getEndpointOutcome
protected @Nullable ConditionOutcome getEndpointOutcome(ConditionContext context, String endpointName) -
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.enabledproperty, matching if it istrueor if it is not configured.- Parameters:
context- the condition contextannotationAttributes- the annotation attributes- Returns:
- the default outcome
- Since:
- 2.6.0
-