Liquibase.properties file not being picked up when running using Spring bean (SpringLiquibase)

Dependency used: liquibase-core:3.6.1
Java 8
Gradle project using Spring

I am running Liquibase using a Spring Bean which is defined as follows:

@Bean
SpringLiquibase springLiquibaseIntegration() throws PropertyVetoException {
final SpringLiquibase springLiquibase = new SpringLiquibase();
springLiquibase.setDataSource(dataSource());
springLiquibase.setChangeLog(“classpath:db-master-changelog.xml”);
return springLiquibase;
}

Some recent DB changes that are being applied via one of my changelogs takes a long time to run and exceeds the default 5 minute timeout.

I have created a liquibase.properties file and put it in my src/main/resources folder. This results in the file being present on the classpath in the generated WAR file. Contents of the file:

liquibase.changeLogLockWaitTimeInMinutes: 10
liquibase.changeLogLockPollRate: 15

However, the liquibase.properties is NOT being picked up and the default wait time of 5 minutes and poll time of 10 seconds remains in place.

How do configure Liquibase to use the created liquibase.properties file?

1 Like

Hi Karen, while unfortunately I do not have an answer for you, your problem sounds similar to mine:

4.17.2 CLI not reading liquibase.properties file consistently - Liquibase Development - Liquibase

But in your case you are using Spring and I’m using the command line interface.

Hopefully we’ll see a response to either of our cases soon!