Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class liquibase.integration.spring.SpringLiquibase

        liquibase.integration.spring.SpringLiquibase.SpringResourceOpener
    • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidafterPropertiesSet() 
      voiddestroy() 
      voidsetCloseDataSourceOnceMigrated​(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
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws liquibase.exception.LiquibaseException
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class liquibase.integration.spring.SpringLiquibase
        Throws:
        liquibase.exception.LiquibaseException
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception