Spring boot ws starter更改了默认的liquibase资源位置

时间:2015-11-05 03:22:10

标签: spring spring-boot liquibase

我在我的maven pom中:

    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
    </dependency>

工作正常,但一旦添加:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-ws</artifactId>
    </dependency>

文件,项目开始抛出异常

Cannot find changelog location: ServletContext resource [/db/changelog/db.changelog-master.xml] (please add changelog or check your Liquibase configuration)

做一点挖掘自己,我可以看到在添加start-ws依赖项后,资源加载路径

@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());
    }

更改
db/changelog/db.changelog-master.xml

/db/changelog/db.changelog-master.xml

导致问题,任何人都可以建议为什么会出现这种行为或只是如何解决它?谢谢!

0 个答案:

没有答案