本文介绍了Liquibase变更集未在bootRepackage gradle任务中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Spring启动应用程序中创建了liquibase变更集.如果我执行bootRun任务,那么更改集将被执行,但是,如果我运行bootRepackage,更改集将不被执行.

I have created liquibase changesets, in the Spring boot application. If I execute bootRun task then changesets get executed however, if I run bootRepackage changesets are not executed.

为了使用bootRepackage运行变更集,我需要做哪些其他配置.

What additional configuration I need to do in order to run changesets with bootRepackage.

推荐答案

我建议您添加脚本中的任务树插件

plugins {
    id "com.dorongold.task-tree" version "1.3"
}

然后运行

gradle bootRun bootRepackage taskTree

然后您应该查看哪些任务由 bootRun 任务运行,哪些不是由 bootRepackage 任务运行.

You should then see which tasks are run by the bootRun task which are not run by the bootRepackage task.

然后您可能会在 build.gradle

bootRepackage {
    dependsOn someLiquibaseTask
}

这篇关于Liquibase变更集未在bootRepackage gradle任务中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 15:26