内容简介:翻译自:https://stackoverflow.com/questions/45060443/spring-4-3-7-is-throwing-java-lang-noclassdeffounderror-com-fasterxml-jackson-c
4.3.4迁移到4.3.7时,我在添加Jackson-core依赖后面临NoclassDefined错误
Caused By: org.springframework.beans.BeanInstantiationException:
Failed to instantiate
[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]:
Constructor threw exception; nested exception is
java.lang.NoClassDefFoundError:
com/fasterxml/jackson/core/util/DefaultIndenter
我试着添加杰克逊核心
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.5</version> </dependency>
依赖也没有运气
任何能够阐明这一点的人都会受到赞赏.
谢谢
维诺德
如果其他人通过Google发现了这一点,并且您使用的是SpringBoot,那么这就解决了我的问题.尝试设置您的pom文件的父级(即Maven项目):
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
这会将spring-boot-starter版本设置为2.0.2,而不是1.x,这是默认值(至少对我而言).
在 the comment of Chris Nauroth 之后,我使用了mvn依赖:tree并看到1.x版本的SpringBoot使用了2.4.x版本的Jackson,而spring-boot-starter版本2.x使用了Jackson 2.5或更高版本.
翻译自:https://stackoverflow.com/questions/45060443/spring-4-3-7-is-throwing-java-lang-noclassdeffounderror-com-fasterxml-jackson-c
以上所述就是小编给大家介绍的《Spring 4.3.7抛出java.lang.NoClassDefFoundError:com / fasterxml / jackson / core / util / D...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Web Application Hacker's Handbook
Dafydd Stuttard、Marcus Pinto / Wiley / 2011-9-27 / USD 50.00
The highly successful security book returns with a new edition, completely updated Web applications are the front door to most organizations, exposing them to attacks that may disclose personal infor......一起来看看 《The Web Application Hacker's Handbook》 这本书的介绍吧!
HTML 编码/解码
HTML 编码/解码
XML 在线格式化
在线 XML 格式化压缩工具