且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于java.lang.NoClassDefFoundError无法运行代码:com / fasterxml / jackson / annotation / JsonMerge

更新时间:2022-05-29 22:16:15

您很可能通过不同的依赖项导入了不同的版本作为子依赖项。

You most likely have different versions imported through different dependencies as sub-dependencies.

您可以让maven向您展示所谓的有效pom,它将为您提供完整的依赖树,然后您可以从中看到包含的内容。

You can get maven to show you the so-called "effective pom" which will give you the full dependency tree, from which you can then see where what's included.

某些IDE(如IntelliJ)可以选择以图形方式显示,这样可以更容易地发现这样的冲突。

Some IDEs (like IntelliJ) have an option to show this graphically, which makes finding conflicts like this a lot easier.

排除较低版本,如果需要,可以明确地将依赖项添加到较新版本。

Exclude lower versions, and if required explicitly add dependencies to newer versions.