Class AbstractBeansOfTypeDependsOnDatabaseInitializationDetector

java.lang.Object
org.springframework.boot.sql.init.dependency.AbstractBeansOfTypeDependsOnDatabaseInitializationDetector
All Implemented Interfaces:
DependsOnDatabaseInitializationDetector

public abstract class AbstractBeansOfTypeDependsOnDatabaseInitializationDetector extends Object implements DependsOnDatabaseInitializationDetector
Base class for DependsOnDatabaseInitializationDetectors that detect by type beans that depend upon database initialization.
Since:
2.5.0
Author:
Andy Wilkinson
  • Constructor Details

    • AbstractBeansOfTypeDependsOnDatabaseInitializationDetector

      public AbstractBeansOfTypeDependsOnDatabaseInitializationDetector()
  • Method Details

    • detect

      public Set<String> detect(ConfigurableListableBeanFactory beanFactory)
      Description copied from interface: DependsOnDatabaseInitializationDetector
      Detect beans defined in the given beanFactory that depend on database initialization. If no beans are detected, an empty set is returned.
      Specified by:
      detect in interface DependsOnDatabaseInitializationDetector
      Parameters:
      beanFactory - bean factory to examine
      Returns:
      names of any beans that depend upon database initialization
    • getDependsOnDatabaseInitializationBeanTypes

      protected abstract Set<Class<?>> getDependsOnDatabaseInitializationBeanTypes()
      Returns the bean types that should be detected as depending on database initialization.
      Returns:
      the database initialization dependent bean types