Example Configuration:
This Spring configuration example will cause liquibase to run automatically when the Spring context is
initialized. It will load db-changelog.xml from the classpath and apply it against
myDataSource.
<bean id="myLiquibase"
class="liquibase.spring.SpringLiquibase"
>
<property name="dataSource" ref="myDataSource" />
<property name="changeLog" value="classpath:db-changelog.xml" />
</bean>
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected boolean | |
| protected String | |
| protected String | |
| protected String | |
| protected DataSource | |
| protected String | |
| protected boolean | |
| protected String | |
| protected String | |
| protected String | |
| protected final Logger | |
| protected Map | |
| protected ResourceLoader | |
| protected File | |
| protected boolean | |
| protected UpdateSummaryEnum | |
| protected UpdateSummaryOutputEnum | |
| protected String | |
| protected boolean | |
| protected UIServiceEnum |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Executed automatically when the bean is initialized. |
| protected Database | Returns: a Database implementation retrieved from theDatabaseFactorythe connection to the database c, ResourceAccessor resourceAccessor)Subclasses may override this method to modify the database settings, such as the default schema, before returning the database object. |
| protected Liquibase | |
| protected SpringResourceAccessor | |
| private void | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public DataSource | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| public ResourceLoader | |
| public String | |
| public UIServiceEnum | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| protected void | |
| public void | setBeanName(String
the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the name)BeanFactoryUtils#originalBeanName(String)
method to extract the original bean name (without suffix), if desired.Implements org. Spring sets this automatically to the instance's configured bean name. |
| public void | setChangeLog(String dataModel)
Sets a Spring Resource that is able to resolve to a file or classpath resource. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setDataSource(DataSource dataSource)
The DataSource that liquibase will use to perform the migration. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setResourceLoader(ResourceLoader
the ResourceLoader object to be used by this object resourceLoader)Implements org. Set the ResourceLoader that this object runs in. This might be a ResourcePatternResolver, which can be checked
through |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setTestRollbackOnUpdate(boolean testRollbackOnUpdate)
If testRollbackOnUpdate is set to true a rollback will be tested at update time. |
| public void | |
| public String |
| beanName | back to summary |
|---|---|
| protected String beanName | |
| changeLog | back to summary |
|---|---|
| protected String changeLog | |
| clearCheckSums | back to summary |
|---|---|
| protected boolean clearCheckSums | |
| contexts | back to summary |
|---|---|
| protected String contexts | |
| databaseChangeLogLockTable | back to summary |
|---|---|
| protected String databaseChangeLogLockTable | |
| databaseChangeLogTable | back to summary |
|---|---|
| protected String databaseChangeLogTable | |
| dataSource | back to summary |
|---|---|
| protected DataSource dataSource | |
| defaultSchema | back to summary |
|---|---|
| protected String defaultSchema | |
| dropFirst | back to summary |
|---|---|
| protected boolean dropFirst | |
| labelFilter | back to summary |
|---|---|
| protected String labelFilter | |
| liquibaseSchema | back to summary |
|---|---|
| protected String liquibaseSchema | |
| liquibaseTablespace | back to summary |
|---|---|
| protected String liquibaseTablespace | |
| log | back to summary |
|---|---|
| protected final Logger log | |
| parameters | back to summary |
|---|---|
| protected Map<String, String> parameters | |
| resourceLoader | back to summary |
|---|---|
| protected ResourceLoader resourceLoader | |
| rollbackFile | back to summary |
|---|---|
| protected File rollbackFile | |
| shouldRun | back to summary |
|---|---|
| protected boolean shouldRun | |
| showSummary | back to summary |
|---|---|
| protected UpdateSummaryEnum showSummary | |
| showSummaryOutput | back to summary |
|---|---|
| protected UpdateSummaryOutputEnum showSummaryOutput | |
| tag | back to summary |
|---|---|
| protected String tag | |
| testRollbackOnUpdate | back to summary |
|---|---|
| protected boolean testRollbackOnUpdate | |
| uiService | back to summary |
|---|---|
| protected UIServiceEnum uiService | |
| SpringLiquibase | back to summary |
|---|---|
| public SpringLiquibase() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws LiquibaseException Implements org. Executed automatically when the bean is initialized.
| |
| createDatabase | back to summary |
|---|---|
| protected Database createDatabase(Connection c, ResourceAccessor resourceAccessor) throws DatabaseException Subclasses may override this method to modify the database settings, such as the default schema, before returning the database object.
| |
| createLiquibase | back to summary |
|---|---|
protected Liquibase createLiquibase(Connection c) throws LiquibaseException
| |
| createResourceOpener | back to summary |
|---|---|
| protected SpringResourceAccessor createResourceOpener() Create a new resourceOpener. | |
| generateRollbackFile | back to summary |
|---|---|
| private void generateRollbackFile(Liquibase liquibase) throws LiquibaseException | |
| getBeanName | back to summary |
|---|---|
| public String getBeanName() Gets the Spring-name of this instance. | |
| getChangeLog | back to summary |
|---|---|
| public String getChangeLog() Returns a Resource that is able to resolve to a file or classpath resource. | |
| getContexts | back to summary |
|---|---|
| public String getContexts() | |
| getDatabaseChangeLogLockTable | back to summary |
|---|---|
| public String getDatabaseChangeLogLockTable() | |
| getDatabaseChangeLogTable | back to summary |
|---|---|
| public String getDatabaseChangeLogTable() | |
| getDatabaseProductName | back to summary |
|---|---|
public String getDatabaseProductName() throws DatabaseException
| |
| getDataSource | back to summary |
|---|---|
| public DataSource getDataSource() The DataSource that liquibase will use to perform the migration. | |
| getDefaultSchema | back to summary |
|---|---|
| public String getDefaultSchema() | |
| getLabelFilter | back to summary |
|---|---|
| public String getLabelFilter() | |
| getLabels | back to summary |
|---|---|
| public String getLabels()
Deprecated use | |
| getLiquibaseSchema | back to summary |
|---|---|
| public String getLiquibaseSchema() | |
| getLiquibaseTablespace | back to summary |
|---|---|
| public String getLiquibaseTablespace() | |
| getResourceLoader | back to summary |
|---|---|
| public ResourceLoader getResourceLoader() | |
| getTag | back to summary |
|---|---|
| public String getTag() | |
| getUiService | back to summary |
|---|---|
| public UIServiceEnum getUiService() | |
| isClearCheckSums | back to summary |
|---|---|
| public boolean isClearCheckSums() | |
| isDropFirst | back to summary |
|---|---|
| public boolean isDropFirst() | |
| isIgnoreClasspathPrefix | back to summary |
|---|---|
| public boolean isIgnoreClasspathPrefix() | |
| isTestRollbackOnUpdate | back to summary |
|---|---|
| public boolean isTestRollbackOnUpdate() Returns whether a rollback should be tested at update time or not. | |
| performUpdate | back to summary |
|---|---|
| protected void performUpdate(Liquibase liquibase) throws LiquibaseException | |
| setBeanName | back to summary |
|---|---|
| public void setBeanName(String name) Implements org. Spring sets this automatically to the instance's configured bean name.
| |
| setChangeLog | back to summary |
|---|---|
| public void setChangeLog(String dataModel) Sets a Spring Resource that is able to resolve to a file or classpath resource.
An example might be | |
| setChangeLogParameters | back to summary |
|---|---|
| public void setChangeLogParameters(Map<String, String> parameters) | |
| setClearCheckSums | back to summary |
|---|---|
| public void setClearCheckSums(boolean clearCheckSums) | |
| setContexts | back to summary |
|---|---|
| public void setContexts(String contexts) | |
| setDatabaseChangeLogLockTable | back to summary |
|---|---|
| public void setDatabaseChangeLogLockTable(String databaseChangeLogLockTable) | |
| setDatabaseChangeLogTable | back to summary |
|---|---|
| public void setDatabaseChangeLogTable(String databaseChangeLogTable) | |
| setDataSource | back to summary |
|---|---|
| public void setDataSource(DataSource dataSource) The DataSource that liquibase will use to perform the migration. | |
| setDefaultSchema | back to summary |
|---|---|
| public void setDefaultSchema(String defaultSchema) | |
| setDropFirst | back to summary |
|---|---|
| public void setDropFirst(boolean dropFirst) | |
| setIgnoreClasspathPrefix | back to summary |
|---|---|
| public void setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)
Deprecated Always ignoring classpath prefix | |
| setLabelFilter | back to summary |
|---|---|
| public void setLabelFilter(String labelFilter) | |
| setLabels | back to summary |
|---|---|
| public void setLabels(String labels)
Deprecated | |
| setLiquibaseSchema | back to summary |
|---|---|
| public void setLiquibaseSchema(String liquibaseSchema) | |
| setLiquibaseTablespace | back to summary |
|---|---|
| public void setLiquibaseTablespace(String liquibaseTablespace) | |
| setResourceLoader | back to summary |
|---|---|
| public void setResourceLoader(ResourceLoader resourceLoader) Implements org. Doc from org. Set the ResourceLoader that this object runs in. This might be a ResourcePatternResolver, which can be checked
through Invoked after population of normal bean properties but before an init callback
like InitializingBean's
| |
| setRollbackFile | back to summary |
|---|---|
| public void setRollbackFile(File rollbackFile) | |
| setShouldRun | back to summary |
|---|---|
| public void setShouldRun(boolean shouldRun) | |
| setShowSummary | back to summary |
|---|---|
| public void setShowSummary(UpdateSummaryEnum showSummary) | |
| setShowSummaryOutput | back to summary |
|---|---|
| public void setShowSummaryOutput(UpdateSummaryOutputEnum showSummaryOutput) | |
| setTag | back to summary |
|---|---|
| public void setTag(String tag) | |
| setTestRollbackOnUpdate | back to summary |
|---|---|
| public void setTestRollbackOnUpdate(boolean testRollbackOnUpdate) If testRollbackOnUpdate is set to true a rollback will be tested at update time. For doing so when the update is performed | |
| setUiService | back to summary |
|---|---|
| public void setUiService(UIServiceEnum uiService) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |