SSM使用高版本的spring(我用的5.0.8),报错Error creating bean with name 'requestMappingHandlerAdapter' defined in

Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException

在修改spring版本为5.0.8之后,导致版本不一致,出现

Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource

java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException     错误

修改jackson的版本,原来的版本太低。

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>2.9.6</version>
  <type>bundle</type>
</dependency>

修改之后问题解决

猜你喜欢

转载自blog.csdn.net/qq_35273918/article/details/81708617