Skip to content
Advertisement

Error creating bean with name ‘liquibase’ in Spring Boot App

I have difficulties with adding Liquibase to my existing Spring Boot application.

I added the necessary dependency in pom.xml. Then I have added an empty changelog-master.xml file Here is the code:

JavaScript

http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd”>

But when I run the program I got an exception:

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-master.xml] cannot be resolved to URL because it does not exist

Could anyone suggest some actions?

Advertisement

Answer

you should add path to your changelog file in application.yml

for example:

JavaScript

and you should create valid empty changelog:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement