【问题标题】:How can i use liquibase with spring cloud config server?如何将 liquibase 与 spring 云配置服务器一起使用?
【发布时间】:2021-09-20 23:08:28
【问题描述】:

我目前正在尝试学习微服务架构。我一直在尝试开发一个 Spring Boot 应用程序。我刚刚在我的应用程序中实现了配置服务器。在我实现 Config Server 之前,liquibase 可以很好地处理这些属性。

spring:
  liquibase:
    enabled: true
    change-log: classpath:/db.changelog-master.xml

实施后,我的服务没有找到 db.changelog-master.xml 文件。 db.changelog 目录在我的服务资源下。我应该如何更改“change-log”属性?

【问题讨论】:

标签: spring-boot microservices spring-cloud liquibase spring-cloud-config


【解决方案1】:

我已经像这样更改了更改日志属性

change-log: classpath:/db/changelog/db.changelog-master.xml

我已经在我的根 pom.xml 文件中插入了<include>**/*.xml</include>

<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.json</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
    </build>

现在一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-15
    • 2022-01-26
    • 2019-07-21
    • 2017-01-03
    • 2011-02-26
    • 2016-05-12
    • 2016-06-17
    • 2019-08-19
    相关资源
    最近更新 更多