Interface DatabaseInitializerDetector
- All Superinterfaces:
Ordered
- All Known Implementing Classes:
AbstractBeansOfTypeDatabaseInitializerDetector
Detects beans that initialize an SQL database. Implementations should be registered in
META-INF/spring.factories
under the key
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector
.- Since:
- 2.5.0
- Author:
- Andy Wilkinson
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptiondetect
(ConfigurableListableBeanFactory beanFactory) Detect beans defined in the givenbeanFactory
that initialize aDataSource
.default void
detectionComplete
(ConfigurableListableBeanFactory beanFactory, Set<String> dataSourceInitializerNames) Callback indicating that all knownDataSourceInitializerDetectors
have been called and detection of beans that initialize aDataSource
is complete.default int
getOrder()
-
Method Details
-
detect
Detect beans defined in the givenbeanFactory
that initialize aDataSource
.- Parameters:
beanFactory
- bean factory to examine- Returns:
- names of the detected
DataSource
initializer beans, or an empty set if none were detected.
-
detectionComplete
default void detectionComplete(ConfigurableListableBeanFactory beanFactory, Set<String> dataSourceInitializerNames) Callback indicating that all knownDataSourceInitializerDetectors
have been called and detection of beans that initialize aDataSource
is complete.- Parameters:
beanFactory
- bean factory that was examineddataSourceInitializerNames
- names of theDataSource
initializer beans detected by all known detectors
-
getOrder
default int getOrder()
-