Error Reading Migration File (Java Spring Boot)
При запуске проекта появляется ошибка:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.ChangeLogParseException: Error Reading Migration File: class path resource [db/changelog/changelog.xml] cannot be resolved to URL because it does not exist
Пути указаны верно, как я думаю. Просмотрел много подобных вопросов на разных форумах, ничего не помогло.
Вот папка ресурсов:
в properties указаны следующие значения:
spring.liquibase.enabled=true
spring.liquibase.change-log=classpath:db/changelog/changelog.xml
В changelog.xml:
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<include relativeToChangelogFile="true" file="v1.0/changelog-v1.0.xml"/>
</databaseChangeLog>
В changelog-v1.0.xml:
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<include relativeToChangelogFile="true" file="bi_schema.xml"/>
</databaseChangeLog>
Ответы (1 шт):
Автор решения: Maksim Matantsev
→ Ссылка
Проблема решена. Пути все верны, но оказалось, что есть одна ошибка в pom.xml
Заключается она в том, что там написана строчка, которую надо удалить.
<packaging>pom</packaging>
Так как в проекте всего один модуль.
