Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is 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
这个问题是在利用jackson,处理json数据的时候,在spring4.x的环境下导入Jackson的jar包,结果运行时报了上面的错误,在网上找到了解决办法,说是版本太低(我用的2.4的版本),说是如果spring是4.0以上的版本就必须使用jackson2.6以上的版本,所以我就下载了2.9的版本,成功解决问题。
jar包 链接:https://pan.baidu.com/s/1XP4b6d5jyQ4P0NORSTMxTQ
提取码:wdmm