Spring boot error - Liquibase

Asked

Viewed 217 times

0

18-04-15 23:10:21.452 INFO 9464 --- [ restartedMain] o.apache.Catalina.core.Standardservice : Stopping service [Tomcat] 2018-04-15 23:10:21.470 INFO 9464 --- [ restartedMain] Conditionevaluationreportlogginglistener :

Error Starting Applicationcontext. To display the conditions report re-run your application with 'debug' enabled. 2018-04-15 23:10:21.484 ERROR 9464 --- [ restartedMain] o.s.boot.Springapplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot find changelog Location: class path Resource [db/changelog/db.changelog-master.yaml] (Please add changelog or check your Liquibase Configuration) at org.springframework.Beans.factory.Annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(Initdestroyannotationbeanpostprocessor.java:138) ~[spring-Beans-5.0.4.RELEASE. jar:5.0.4.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(Abstractautowirecapablebeanfactory.java:423) ~[spring-Beans-5.0.4.RELEASE. jar:5.0.4.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(Abstractautowirecapablebeanfactory.java:1702) ~[spring-Beans-5.0.4.RELEASE. jar:5.0.4.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(Abstractautowirecapablebeanfactory.java:583) ~[spring-Beans-5.0.4.RELEASE. jar:5.0.4.RELEASE] at org.springframework.Beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Abstractautowirecapablenfactory.java:502) ~[spring-Beans-5.0.4.RELEASE. jar:5.0.4.RELEASE]

I’m making this mistake, someone could help me?

  • Vc created a changelog file in the default path (db/changelog/db.changelog-master.yaml)?

  • Yes, it is done. The strange thing is that I copy from a project that goes up normally, and in this one he doesn’t want to go up.

  • <?xml version="1.0" encoding="UTF-8"? > <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml//nsdbchangelog-ext" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd&#xA; http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">&#xA; <property name="TYPE_ID" value="varchar(36)" />

  • <Property name="TYPE_DESCRICAO" value="varchar(25)" /> <include file="db/changelog/db.changelog-1. 0.xml"/> </databasehangeCLog>

1 answer

0

In Spring boot you have a pro liquibase setting that tells the location of your changelog file, whereas the "db" folder is in the "Resources" folder of the project. Following example:

liquibase.change-log = classpath:db/changelog.xml

Browser other questions tagged

You are not signed in. Login or sign up in order to post.