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
-
Method Summary
Modifier and TypeMethodDescriptionorg.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
-
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 classorg.springframework.boot.autoconfigure.condition.SpringBootCondition
- Parameters:
context
- the spring context at the point in time the condition is being evaluatedmetadata
- annotation metadata containing all acceptable GCP environments- Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException
- if no GcpEnvironmentProvider is found in spring context
-