Я разрабатываю инструмент миграции базы данных spring-shell
.
На данный момент я пытаюсь использовать liquibase с расширением groovy-dsl. Мой build.gradle включает в себя банку расширения, также я объявил liquibase в spring-shell-plugin.xml
spring-shell-plugin.xml
<bean id="liquibase" class="liquibase.integration.spring.SpringLiquibase" depends-on="postgresService">
<property name="dataSource" ref="psqlDataSource"/>
<property name="changeLog" value="com.example.db.DbChangelog_master"/>
<property name="defaultSchema" value="${postgres.schema}"/>
</bean>
Но каждый раз, когда я запускаю приложение, Liquibase выдает следующую ошибку
Caused by: liquibase.exception.UnknownChangelogFormatException: Cannot find parser that supports com.example.db.DbChangelog_master
at liquibase.parser.ChangeLogParserFactory.getParser(ChangeLogParserFactory.java:70)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:226)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:434)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:391)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 13 more
Документация немного редка, также jar включен в путь к классам.
Должны ли заводные сценарии быть в src/main/resources
? В настоящее время они находятся в отдельном пакете в src/main/groovy
.