Liquibase 4.0 中删除了通过绝对路径指定文件

Cla*_*nio 10 changelog liquibase spring-boot

当我运行 Spring Boot 应用程序时,出现以下 liquibase 错误:

Liquibase 4.0 中删除了通过绝对路径指定文件的功能。请使用相对路径或将“/”添加到类路径参数中。

这是 application.yaml 中的类路径:

  liquibase:
    change-log: classpath:db/changelog/db-changelog-master.xml
Run Code Online (Sandbox Code Playgroud)

我也尝试过:

  liquibase:
    change-log: classpath:/db/changelog/db-changelog-master.xml
Run Code Online (Sandbox Code Playgroud)

这是文件夹结构:

在此输入图像描述

Changlog大师:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

    <include file="db-changelog-1.0.xml"/>
</databaseChangeLog>
Run Code Online (Sandbox Code Playgroud)

小智 2

看起来这个问题在 v4.4.3 中已修复

  • 我在 ubuntu v4.4.3 上仍然有它。你确定吗? (7认同)
  • 4.6.1 上仍然存在 (2认同)