Spring Integration
LiquiBase can be run in a Spring environment by declaring a liquibase.spring.SpringLiquibase bean.
Example
<bean id="liquibase" 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" /> <!-- contexts specifies the runtime contexts to use. --> <property name="contexts" value="test, production" /> </bean>
