I have an application with Multi Tenant. However, this same application has liquibase. I need to run liquibase in all my datasources however, I can not use this Bean.
My application.yml

My bean:
@Bean
public MultiTenantSpringLiquibase liquibase(){
MultiTenantSpringLiquibase mt = new MultiTenantSpringLiquibase();
return mt;
}
I do not know how to instantiate this bean, since the documentation does not make clear how to do.
http://www.liquibase.org/javadoc/liquibase/integration/spring/MultiTenantSpringLiquibase.html#setResourceLoader(org.springframework.core.io.ResourceLoader)
I also do not know how to set my application.yml and pass the tenants tree.
Could you help me?
I had similar issue, so I removed the liquibase aspect from my main project and created a separate spring boot application which mainly handles liquibase aspect and creates schemas. This Guy did a job well, take a look https://github.com/rmsantana/poc-multi-tenant/blob/master/src/main/java/com/rafael/Application.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With