类 ResourceCondition

    • 构造器详细资料

      • ResourceCondition

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

      • getMatchOutcome

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

        protected ConditionOutcome getResourceOutcome​(org.springframework.context.annotation.ConditionContext context,
                                                      org.springframework.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