Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/util/DefaultIndenter

搭建一个 springboot 项目,启动报错:

ClassNotFoundException: com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector

网上说 jackson 的问题,改了 jackson 的版本,又报错:
NoClassDefFoundError: com/fasterxml/jackson/core/util/DefaultIndenter

网上继续搜,说用 2.8.7 版的 jackson jar 可以解决。试了一下,管用!

所以,最后就用这些 2.8.7 版的 maven 依赖配置:

    
		com.fasterxml.jackson.core
		jackson-core
		2.8.7
	
	
		com.fasterxml.jackson.core
		jackson-databind
		2.8.7
	
	
		com.fasterxml.jackson.core
		jackson-annotations
		2.8.7
	
	
		com.fasterxml.jackson.module
		jackson-module-jaxb-annotations
		2.8.7
	

 

你可能感兴趣的:(java)