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 utilizes
The wrapper scans the subtree for all data sources and creates
Example:
SpringLiquibase
per each
data source. All the parameters are the same as for SpringLiquibase
except 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 with jndiBase
property.The wrapper scans the subtree for all data sources and creates
SpringLiquibase
instances.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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
Deprecated.use#setLabelFilter(String)
void
setResourceLoader
(org.springframework.core.io.ResourceLoader resourceLoader)
-
Constructor Details
-
MultiTenantSpringLiquibase
public MultiTenantSpringLiquibase()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
getLabels
Deprecated.use#getLabelFilter()
-
setLabels
Deprecated.use#setLabelFilter(String)
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoader
in interfaceorg.springframework.context.ResourceLoaderAware
-
#getLabelFilter()