Package liquibase.integration.spring
Class MultiTenantSpringLiquibase
- java.lang.Object
-
- liquibase.integration.spring.MultiTenantSpringLiquibase
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ResourceLoaderAware
public class MultiTenantSpringLiquibase extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware
A wrapper of Liquibase suitable in multi-tenant environments where multiple data sources represent tenants. It utilizesSpringLiquibaseper each data source. All the parameters are the same as forSpringLiquibaseexcept of the data source definition - in this case it is a list of data sources available under specified JNDI subtree. You have to define the subtree withjndiBaseproperty.
The wrapper scans the subtree for all data sources and createsSpringLiquibaseinstances.
Example:
<bean id="liquibase" class="liquibase.integration.spring.MultiTenantSpringLiquibase"> <property name="jndiBase" value="java:comp/env/jdbc/db" /> <property name="changeLog" value="classpath:db/migration/db-changelog.xml" /> </bean>- See Also:
SpringLiquibase
-
-
Constructor Summary
Constructors Constructor Description MultiTenantSpringLiquibase()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()StringgetLabels()Deprecated.use#getLabelFilter()voidsetLabels(String labels)Deprecated.use#setLabelFilter(String)voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getLabels
public String getLabels()
Deprecated.use#getLabelFilter()
-
setLabels
public void setLabels(String labels)
Deprecated.use#setLabelFilter(String)
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
- Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware
-
-