类 ResourceCondition

java.lang.Object
cn.taketoday.context.condition.ContextCondition
cn.taketoday.context.condition.ResourceCondition
所有已实现的接口:
Condition

public abstract class ResourceCondition extends ContextCondition
ContextCondition used to check if a resource can be found using a configurable property and optional default location(s).
从以下版本开始:
4.0 2022/4/4 13:33
作者:
Stephane Nicoll, Phillip Webb, Madhura Bhave, Harry Yang
  • 构造器详细资料

    • ResourceCondition

      protected ResourceCondition(String name, String property, String... resourceLocations)
      Create a new condition.
      参数:
      name - the name of the component
      property - the configuration property
      resourceLocations - default location(s) where the configuration file can be found if the configuration key is not specified
  • 方法详细资料

    • getMatchOutcome

      public ConditionOutcome getMatchOutcome(ConditionEvaluationContext context, cn.taketoday.core.type.AnnotatedTypeMetadata metadata)
      从类复制的说明: ContextCondition
      Determine the outcome of the match along with suitable log output.
      指定者:
      getMatchOutcome 在类中 ContextCondition
      参数:
      context - the condition context
      metadata - the annotation metadata
      返回:
      the condition outcome
    • getResourceOutcome

      protected ConditionOutcome getResourceOutcome(ConditionEvaluationContext context, cn.taketoday.core.type.AnnotatedTypeMetadata metadata)
      Check if one of the default resource locations actually exists.
      参数:
      context - the condition context
      metadata - the annotation metadata
      返回:
      the condition outcome
    • startConditionMessage

      protected final ConditionMessage.Builder startConditionMessage()