Class DataSourceClosingSpringLiquibase
java.lang.Object
liquibase.integration.spring.SpringLiquibase
org.springframework.boot.liquibase.autoconfigure.DataSourceClosingSpringLiquibase
- All Implemented Interfaces:
Aware, BeanNameAware, DisposableBean, InitializingBean, ResourceLoaderAware
A custom
SpringLiquibase extension that closes the underlying
DataSource once the database has been migrated.- Since:
- 4.0.0
- Author:
- Andy Wilkinson
-
Field Summary
Fields inherited from class SpringLiquibase
analyticsEnabled, beanName, changeLog, clearCheckSums, contexts, customizer, databaseChangeLogLockTable, databaseChangeLogTable, dataSource, defaultSchema, dropFirst, labelFilter, licenseKey, liquibaseSchema, liquibaseTablespace, log, parameters, resourceLoader, rollbackFile, shouldRun, showSummary, showSummaryOutput, tag, testRollbackOnUpdate, uiService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()voidsetCloseDataSourceOnceMigrated(boolean closeDataSourceOnceMigrated) Methods inherited from class SpringLiquibase
createDatabase, createLiquibase, createResourceOpener, getAnalyticsEnabled, getBeanName, getChangeLog, getContexts, getCustomizer, getDatabaseChangeLogLockTable, getDatabaseChangeLogTable, getDatabaseProductName, getDataSource, getDefaultSchema, getLabelFilter, getLabels, getLicenseKey, getLiquibaseSchema, getLiquibaseTablespace, getResourceLoader, getTag, getUiService, isClearCheckSums, isDropFirst, isTestRollbackOnUpdate, performUpdate, setAnalyticsEnabled, setBeanName, setChangeLog, setChangeLogParameters, setClearCheckSums, setContexts, setCustomizer, setDatabaseChangeLogLockTable, setDatabaseChangeLogTable, setDataSource, setDefaultSchema, setDropFirst, setLabelFilter, setLabels, setLicenseKey, setLiquibaseSchema, setLiquibaseTablespace, setResourceLoader, setRollbackFile, setShouldRun, setShowSummary, setShowSummaryOutput, setTag, setTestRollbackOnUpdate, setUiService, toString
-
Constructor Details
-
DataSourceClosingSpringLiquibase
public DataSourceClosingSpringLiquibase()
-
-
Method Details
-
setCloseDataSourceOnceMigrated
public void setCloseDataSourceOnceMigrated(boolean closeDataSourceOnceMigrated) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classSpringLiquibase- Throws:
LiquibaseException
-
destroy
- Specified by:
destroyin interfaceDisposableBean- Throws:
Exception
-