Examples of ConditionOutcome


Examples of org.springframework.boot.autoconfigure.condition.ConditionOutcome

        AnnotatedTypeMetadata metadata) {
      String endpointEnabled = context.getEnvironment().getProperty(
          "endpoints.jmx.enabled", "true");
      String jmxEnabled = context.getEnvironment().getProperty(
          "spring.jmx.enabled", "true");
      return new ConditionOutcome("true".equalsIgnoreCase(endpointEnabled)
          && "true".equalsIgnoreCase(jmxEnabled),
          "JMX endpoint and JMX enabled");

    }
View Full Code Here

Examples of org.springframework.boot.autoconfigure.condition.ConditionOutcome

    private final String message;

    public MessageAndCondition(ConditionAndOutcome conditionAndOutcome) {
      Condition condition = conditionAndOutcome.getCondition();
      ConditionOutcome outcome = conditionAndOutcome.getOutcome();
      this.condition = ClassUtils.getShortName(condition.getClass());
      if (StringUtils.hasLength(outcome.getMessage())) {
        this.message = outcome.getMessage();
      }
      else {
        this.message = (outcome.isMatch() ? "matched" : "did not match");
      }
    }
View Full Code Here

Examples of org.springframework.boot.autoconfigure.condition.ConditionOutcome

        AnnotatedTypeMetadata metadata) {
      String managementEnabled = context.getEnvironment().getProperty(
          "management.security.enabled", "true");
      String basicEnabled = context.getEnvironment().getProperty(
          "security.basic.enabled", "true");
      return new ConditionOutcome("true".equalsIgnoreCase(managementEnabled)
          && !"true".equalsIgnoreCase(basicEnabled),
          "Management security enabled and basic disabled");
    }
View Full Code Here

Examples of org.springframework.boot.autoconfigure.condition.ConditionOutcome

    @Override
    public ConditionOutcome getMatchOutcome(ConditionContext context,
        AnnotatedTypeMetadata metadata) {
      String basename = context.getEnvironment().getProperty(
          "spring.messages.basename", "messages");
      ConditionOutcome outcome = cache.get(basename);
      if (outcome == null) {
        outcome = getMatchOutcomeForBasename(context, basename);
        cache.put(basename, outcome);
      }
      return outcome;
View Full Code Here

Examples of org.springframework.boot.autoconfigure.condition.ConditionOutcome

    @Override
    public ConditionOutcome getMatchOutcome(ConditionContext context,
        AnnotatedTypeMetadata metadata) {
      ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
      ConditionOutcome outcome = checkServlets(beanFactory);
      if (!outcome.isMatch()) {
        return outcome;
      }
      return checkServletRegistrations(beanFactory);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.