Class DataSourceClosingSpringLiquibase
java.lang.Object
liquibase.integration.spring.SpringLiquibase
org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase
- All Implemented Interfaces:
Aware
,BeanNameAware
,DisposableBean
,InitializingBean
,ResourceLoaderAware
public class DataSourceClosingSpringLiquibase
extends liquibase.integration.spring.SpringLiquibase
implements DisposableBean
A custom
SpringLiquibase
extension that closes the underlying
DataSource
once the database has been migrated.- Since:
- 2.0.6
- Author:
- Andy Wilkinson
-
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 interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classliquibase.integration.spring.SpringLiquibase
- Throws:
liquibase.exception.LiquibaseException
-
destroy
- Specified by:
destroy
in interfaceDisposableBean
- Throws:
Exception
-