我将一个Dropwizard项目导入到Intellij IDEA中(从项目本身使用Gradle Wrapper )。它为其他人工作,但我最终遇到了这样的问题:
下面是“等级依赖”的要点。
线程"main“中的com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z异常:com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
dependencies {
compile (
'io.dropwizard:dropwizard-core:' + dropwizardVersion,
'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion,
'io.dropwizard:dropwizard-migrations:' + dropwizardVersion,
'io.dropwizard:dropwizard-auth:' + dropwizardVersion,
'io.dropwizard:dropwizard-assets:' + dropwizardVersion,
'io.dropwizard:dropwizard-forms:'+ dropwizardVersion,发布于 2019-03-06 08:32:10
您有两个依赖项,它们正在导入较早版本的Jackson Core。
com.amazon.alexa:alexa-skills-kit:1.2
com.google.api-client:google-api-client:1.19.1虽然Gradle应该总是选择最新版本,但这可能会导致您的错误。
因此,排除了使用
implementation('com.amazon.alexa:alexa-skills-kit:1.2') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}
implementation('com.google.api-client:google-api-client:1.19.1') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}或者,将它们更新为兼容的,可能是最新的版本(例如,参见MavenCentral)。
若要强制对特定版本进行解析,可以使用
configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-core:2.8.8'
}
}https://stackoverflow.com/questions/55009341
复制相似问题