Class OnDatabaseInitializationCondition

java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition
All Implemented Interfaces:
org.springframework.context.annotation.Condition

public class OnDatabaseInitializationCondition extends SpringBootCondition
Condition that checks if the database initialization of a particular component should be considered.
Since:
2.6.2
See Also:
  • DatabaseInitializationMode
  • Constructor Details

    • OnDatabaseInitializationCondition

      public OnDatabaseInitializationCondition(String name, String... propertyNames)
      Create a new instance with the name of the component and the property names to check, in order. If a property is set, its value is used to determine the outcome and remaining properties are not tested.
      Parameters:
      name - the name of the component
      propertyNames - the properties to check (in order)
  • Method Details

    • 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