public class SpringLiquibase implements InitializingBean,BeanNameAware,ResourceLoaderAware(Code)
A Spring-ified wrapper for Liquibase.
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" />
<!-- The following configuration options are optional -->
<property name="executeEnabled" value="true" />
<!--
If set to true, writeSqlFileEnabled will write the generated
SQL to a file before executing it.
-->
<property name="writeSqlFileEnabled" value="true" />
<!--
sqlOutputDir specifies the directory into which the SQL file
will be written, if so configured.
-->
<property name="sqlOutputDir" value="c:\sql" />
</bean>
author: Rob Schoening
Inner Class :public class SpringResourceOpener implements FileOpener
If there are any un-run changesets, this method will write them out to a file, if
so configured.
Parameters: liquibase - throws: SQLException - throws: IOException - throws: LiquibaseException -