Class ResourceCondition

    • Constructor Detail

      • ResourceCondition

        protected ResourceCondition​(String name,
                                    String property,
                                    String... resourceLocations)
        Create a new condition.
        Parameters:
        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
        Since:
        2.0.0
    • Method Detail

      • getMatchOutcome

        public ConditionOutcome getMatchOutcome​(org.springframework.context.annotation.ConditionContext context,
                                                org.springframework.core.type.AnnotatedTypeMetadata metadata)
        Description copied from class: SpringBootCondition
        Determine the outcome of the match along with suitable log output.
        Specified by:
        getMatchOutcome in class SpringBootCondition
        Parameters:
        context - the condition context
        metadata - the annotation metadata
        Returns:
        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.
        Parameters:
        context - the condition context
        metadata - the annotation metadata
        Returns:
        the condition outcome