Recently, spring4.x was used to integrate Jackson ------> java. lang. ClassNotFoundException :,
Recently, Jackson was integrated with spring4.x, and the results were inexplicably reported. The online retrieval results were all solved by configuring the dependency conditions in the maven or gradle environment; however, the jar package in the eclipseIDE environment should be automatically dependent on the shadow. The answer to the problem has not been found.
Later, I had a solution. I suspected that the version problem was caused by the version problem. Spring4.x must be at least Jackson2.6 or later for matching.
The error is as follows:
<span>java.lang.ClassNotFoundException: com.fasterxml.jackson.core.util.DefaultIndenter at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)</span>
<span>class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: 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 </span>
<span>DefaultIndenter </span>
Replace Jackson's package with more than 2.6. Three core packages are available on the Internet.