如何在Spring Boot中运行FlyWay的clean命令?

4

我正在使用Spring Boot和FlyWay。 我在Gradle构建文件中添加了FlyWay依赖,如下所示:

dependencies {
    compile("org.springframework.boot:spring-boot-starter-data-jpa")
    compile("org.springframework.boot:spring-boot-starter-web")
    compile("org.postgresql:postgresql:9.4-1202-jdbc42")
    compile("org.flywaydb:flyway-core")
    testCompile("org.springframework.boot:spring-boot-starter-test") 
}

我还添加了一个db/migrations文件夹,并包含一个初始迁移文件。迁移工作正常。但是现在我想通过使用gradle flywayClean任务来进行清理。然而,当我运行它时,我收到一个错误,说找不到该任务。在Spring Boot中,我应该怎么做呢?

1个回答

4

更新的链接:https://flywaydb.org/documentation/getstarted/firststeps/gradle - knjk04

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接