简体   繁体   中英

changelog directory not found after spring boot 3 upgrade

After upgrade to spring boot 3, liquibasebase throws error liquibase.exception.UnexpectedLiquibaseException: java.io.FileNotFoundException: JAR entry db/scripts/dml/importstatus.sql not found

the correct path is db/ changelog /scripts/dml/importstatus.sql, somehow "changelog" gets removed. Other changeSets work fine, error only happens in sqlFile with property

    <property name="script-dir" value="scripts/dml" dbms="postgresql"/>

    <changeSet id="insert-import-status">
        <sqlFile path="${script-dir}/importstatus.sql"
                 splitStatements="false"
                 stripComments="false"
                 encoding="utf8"
                 relativeToChangelogFile="true"
                 endDelimiter=";"/>
    </changeSet>

I tried to use path without property, use "scripts/dml/importstatus.sql" but still got same error.

This is a bug in Liquibase 4.17: https://github.com/liquibase/liquibase/issues/3393

Unfortunately, the Spring Boot dependency management suggests 4.17.2 in the latest releases, as 4.17 was the latest minor release at the time when Spring Boot 3 went GA.

You can either downgrade to 4.16.2 or upgrade to 4.18.0. For example, by overriding the property liquibase.version in your build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM