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, showSummary, showSummaryOutput, tag, testRollbackOnUpdate, uiService
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    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, getUiService, isClearCheckSums, isDropFirst, isTestRollbackOnUpdate, performUpdate, setBeanName, setChangeLog, setChangeLogParameters, setClearCheckSums, setContexts, setDatabaseChangeLogLockTable, setDatabaseChangeLogTable, setDataSource, setDefaultSchema, setDropFirst, setLabelFilter, setLabels, setLiquibaseSchema, setLiquibaseTablespace, setResourceLoader, setRollbackFile, setShouldRun, setShowSummary, setShowSummaryOutput, setTag, setTestRollbackOnUpdate, setUiService, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 interface InitializingBean
      Overrides:
      afterPropertiesSet in class liquibase.integration.spring.SpringLiquibase
      Throws:
      liquibase.exception.LiquibaseException
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface DisposableBean
      Throws:
      Exception