org.flywaydb.core.internal.license.FlywayEnterpriseUpgradeRequiredException - ClassNotFoundException

org.flywaydb.core.internal.license.FlywayEnterpriseUpgradeRequiredException - ClassNotFoundException

在我的 pom.xml 中,我有:

<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-core</artifactId>
    <version>7.3.1</version>
</dependency>

然而,当我 运行 我的 Web 应用程序时,我得到 ClassNotFoundException org.flywaydb.core.internal.license.FlywayEnterpriseUpgradeRequiredException

拜托,帮忙。

class FlywayEnterpriseUpgradeRequiredException 在版本 7 中被删除,当时“Enterprise”和“Pro”版本合并到“Teams”中。您的应用程序代码似乎明确捕获了 v6 异常类型,因此需要更新。

完全限定的 class 名称包括 internal,这应该表明它不是 API 的正式部分,不应依赖于它不会更改(尽管在主要版本,打破 API 更改是可能的)。您的应用程序应该改为捕获父 class org.flywaydb.core.api.FlywayException