Skip to content

Commit

Permalink
feat: set liquibase config automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Yalz committed Jun 17, 2024
1 parent 92a2a7b commit 8848c63
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package be.vlaanderen.informatievlaanderen.ldes.server.liquibase;

import liquibase.integration.spring.SpringLiquibase;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
public class LiquibaseConfig {

@Bean
public SpringLiquibase liquibase(DataSource dataSource) {
SpringLiquibase liquibase = new SpringLiquibase();
liquibase.setChangeLog("classpath:/db/changelog/master.xml"); // Set your desired change log path
liquibase.setDataSource(dataSource); // Configure your data source
return liquibase;
}
}

0 comments on commit 8848c63

Please sign in to comment.