@Bean @DependsOn("liquibase") public MultiTenantSpringLiquibase multiTenantLiquibase( DataSource dataSource, LiquibaseProperties liquibaseProperties) { MultiTenantSpringLiquibase liquibase = new XmMultiTenantSpringLiquibase(); liquibase.setDataSource(dataSource); liquibase.setChangeLog(CHANGE_LOG_PATH); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setSchemas(getSchemas()); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } liquibase.setParameters(DatabaseUtil.defaultParams(liquibaseProperties.getDefaultSchema())); return liquibase; }
@Bean @DependsOn("liquibase") public MultiTenantSpringLiquibase multiTenantLiquibase( DataSource dataSource, LiquibaseProperties liquibaseProperties) { MultiTenantSpringLiquibase liquibase = new XmMultiTenantSpringLiquibase(); liquibase.setDataSource(dataSource); liquibase.setChangeLog(CHANGE_LOG_PATH); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setSchemas(getSchemas()); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; }