Class DataSourceClosingSpringLiquibase
java.lang.Object
liquibase.integration.spring.SpringLiquibase
org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ResourceLoaderAware
public class DataSourceClosingSpringLiquibase
extends liquibase.integration.spring.SpringLiquibase
implements org.springframework.beans.factory.DisposableBean
A custom
SpringLiquibase
extension that closes the underlying
DataSource
once the database has been migrated.- Since:
- 2.0.6
-
Field Summary
Fields inherited from class liquibase.integration.spring.SpringLiquibase
beanName, changeLog, clearCheckSums, contexts, databaseChangeLogLockTable, databaseChangeLogTable, dataSource, defaultSchema, dropFirst, labelFilter, liquibaseSchema, liquibaseTablespace, log, parameters, resourceLoader, rollbackFile, shouldRun, tag, testRollbackOnUpdate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
void
setCloseDataSourceOnceMigrated
(boolean closeDataSourceOnceMigrated) Methods inherited from class liquibase.integration.spring.SpringLiquibase
createDatabase, createLiquibase, createResourceOpener, getBeanName, getChangeLog, getContexts, getDatabaseChangeLogLockTable, getDatabaseChangeLogTable, getDatabaseProductName, getDataSource, getDefaultSchema, getLabelFilter, getLabels, getLiquibaseSchema, getLiquibaseTablespace, getResourceLoader, getTag, isClearCheckSums, isDropFirst, isIgnoreClasspathPrefix, isTestRollbackOnUpdate, performUpdate, setBeanName, setChangeLog, setChangeLogParameters, setClearCheckSums, setContexts, setDatabaseChangeLogLockTable, setDatabaseChangeLogTable, setDataSource, setDefaultSchema, setDropFirst, setIgnoreClasspathPrefix, setLabelFilter, setLabels, setLiquibaseSchema, setLiquibaseTablespace, setResourceLoader, setRollbackFile, setShouldRun, setTag, setTestRollbackOnUpdate, toString
-
Constructor Details
-
DataSourceClosingSpringLiquibase
public DataSourceClosingSpringLiquibase()
-
-
Method Details
-
setCloseDataSourceOnceMigrated
public void setCloseDataSourceOnceMigrated(boolean closeDataSourceOnceMigrated) -
afterPropertiesSet
public void afterPropertiesSet() throws liquibase.exception.LiquibaseException- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classliquibase.integration.spring.SpringLiquibase
- Throws:
liquibase.exception.LiquibaseException
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-