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 customSpringLiquibase
extension that closes the underlyingDataSource
once the database has been migrated.- Since:
- 2.0.6
Field Summary
Fields inherited from class liquibase.integration.spring.SpringLiquibase
beanName, changeLog, contexts, databaseChangeLogLockTable, databaseChangeLogTable, dataSource, defaultSchema, dropFirst, labels, liquibaseSchema, liquibaseTablespace, log, parameters, resourceLoader, rollbackFile, shouldRun, tag, testRollbackOnUpdate
Constructor Summary
Constructors Constructor Description DataSourceClosingSpringLiquibase()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
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, getLabels, getLiquibaseSchema, getLiquibaseTablespace, getResourceLoader, getTag, isDropFirst, isIgnoreClasspathPrefix, isTestRollbackOnUpdate, performUpdate, setBeanName, setChangeLog, setChangeLogParameters, setContexts, setDatabaseChangeLogLockTable, setDatabaseChangeLogTable, setDataSource, setDefaultSchema, setDropFirst, setIgnoreClasspathPrefix, setLabels, setLiquibaseSchema, setLiquibaseTablespace, setResourceLoader, setRollbackFile, setShouldRun, setTag, setTestRollbackOnUpdate, toString
Constructor Detail
DataSourceClosingSpringLiquibase
public DataSourceClosingSpringLiquibase()
Method Detail
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