Java 类org.springframework.boot.liquibase.CommonsLoggingLiquibaseLogger 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LiquibaseAutoConfiguration.java   
@PostConstruct
public void checkChangelogExists() {
    if (this.properties.isCheckChangeLogLocation()) {
        Resource resource = this.resourceLoader
                .getResource(this.properties.getChangeLog());
        Assert.state(resource.exists(),
                "Cannot find changelog location: " + resource
                        + " (please add changelog or check your Liquibase "
                        + "configuration)");
    }
    ServiceLocator serviceLocator = ServiceLocator.getInstance();
    serviceLocator.addPackageToScan(
            CommonsLoggingLiquibaseLogger.class.getPackage().getName());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LiquibaseAutoConfigurationTests.java   
@Test
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).isInstanceOf(CommonsLoggingLiquibaseLogger.class);
}
项目:spring-boot-concourse    文件:LiquibaseAutoConfiguration.java   
@PostConstruct
public void checkChangelogExists() {
    if (this.properties.isCheckChangeLogLocation()) {
        Resource resource = this.resourceLoader
                .getResource(this.properties.getChangeLog());
        Assert.state(resource.exists(),
                "Cannot find changelog location: " + resource
                        + " (please add changelog or check your Liquibase "
                        + "configuration)");
    }
    ServiceLocator serviceLocator = ServiceLocator.getInstance();
    serviceLocator.addPackageToScan(
            CommonsLoggingLiquibaseLogger.class.getPackage().getName());
}
项目:spring-boot-concourse    文件:LiquibaseAutoConfigurationTests.java   
@Test
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).isInstanceOf(CommonsLoggingLiquibaseLogger.class);
}
项目:contestparser    文件:LiquibaseAutoConfiguration.java   
@PostConstruct
public void checkChangelogExists() {
    if (this.properties.isCheckChangeLogLocation()) {
        Resource resource = this.resourceLoader
                .getResource(this.properties.getChangeLog());
        Assert.state(resource.exists(),
                "Cannot find changelog location: " + resource
                        + " (please add changelog or check your Liquibase "
                        + "configuration)");
    }
    ServiceLocator serviceLocator = ServiceLocator.getInstance();
    serviceLocator.addPackageToScan(
            CommonsLoggingLiquibaseLogger.class.getPackage().getName());
}
项目:contestparser    文件:LiquibaseAutoConfigurationTests.java   
@Test
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));
}