Class OnGcpEnvironmentCondition

java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
com.google.cloud.spring.autoconfigure.core.environment.OnGcpEnvironmentCondition
All Implemented Interfaces:
org.springframework.context.annotation.Condition

public class OnGcpEnvironmentCondition extends org.springframework.boot.autoconfigure.condition.SpringBootCondition
Condition that determines which GCP environment the application is running on.
Since:
1.1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.boot.autoconfigure.condition.ConditionOutcome
    getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
    Determines whether the current runtime environment matches the one passed through the annotation.

    Methods inherited from class org.springframework.boot.autoconfigure.condition.SpringBootCondition

    anyMatches, logOutcome, matches, matches

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OnGcpEnvironmentCondition

      public OnGcpEnvironmentCondition()
  • Method Details

    • getMatchOutcome

      public org.springframework.boot.autoconfigure.condition.ConditionOutcome getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
      Determines whether the current runtime environment matches the one passed through the annotation.
      Specified by:
      getMatchOutcome in class org.springframework.boot.autoconfigure.condition.SpringBootCondition
      Parameters:
      context - the spring context at the point in time the condition is being evaluated
      metadata - annotation metadata containing all acceptable GCP environments
      Throws:
      org.springframework.beans.factory.NoSuchBeanDefinitionException - if no GcpEnvironmentProvider is found in spring context