Package liquibase.integration.spring

Examples of liquibase.integration.spring.SpringLiquibase


        "liquibase.url:jdbc:hsqldb:mem:liquibase", "liquibase.user:sa");
    this.context.register(EmbeddedDataSourceConfiguration.class,
        LiquibaseAutoConfiguration.class,
        PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
    assertEquals("jdbc:hsqldb:mem:liquibase", liquibase.getDataSource()
        .getConnection().getMetaData().getURL());
  }
View Full Code Here


  public void testLogger() throws Exception {
    this.context.register(EmbeddedDataSourceConfiguration.class,
        LiquibaseAutoConfiguration.class,
        PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
    Object log = ReflectionTestUtils.getField(liquibase, "log");
    assertThat(log, instanceOf(CommonsLoggingLiquibaseLogger.class));
  }
View Full Code Here

    return dataSource;
  }

  @Bean
  public SpringLiquibase databaseReset() {
    SpringLiquibase springLiquibase = new SpringLiquibase();
    springLiquibase.setDataSource( dataSource() );
    springLiquibase.setChangeLog( "classpath:com/foreach/across/test/resetDatabase.xml" );
    springLiquibase.setDropFirst( true );

    return springLiquibase;
  }
View Full Code Here

  @PostConstruct
  protected void installCoreSchema() {
    LOG.info( "Installing the core schema for Across" );

    SpringLiquibase liquibase = new SpringLiquibase();
    liquibase.setChangeLog( "classpath:" + getClass().getName().replace( '.', '/' ) + ".xml" );
    liquibase.setDataSource( dataSource );

    beanFactory.autowireBeanProperties( liquibase, AutowireCapableBeanFactory.AUTOWIRE_NO, false );
    beanFactory.initializeBean( liquibase, "" );
  }
View Full Code Here

  @InstallerMethod
  public void install() {
    AutowireCapableBeanFactory beanFactory = AcrossContextUtils.getBeanFactory( acrossContext.getContext() );

    SpringLiquibase liquibase = new SpringLiquibase();
    liquibase.setChangeLog( changelog );
    liquibase.setDataSource( dataSource );

    if ( schemaConfiguration != null ) {
      liquibase.setChangeLogParameters( buildParameters( schemaConfiguration ) );
    }

    beanFactory.autowireBeanProperties( liquibase, AutowireCapableBeanFactory.AUTOWIRE_NO, false );
    beanFactory.initializeBean( liquibase, "" );
  }
View Full Code Here

TOP

Related Classes of liquibase.integration.spring.SpringLiquibase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.