遇到的问题如下:
1、message Servlet.init() for servlet DispatcherServlet threw exception;
2、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/databind/exc/InvalidDefinitionException;
查询得知由于版本问题所以导致,所以我去了(https://mvnrepository.com/search?q=jackson)下载了2.11.0的三个jar包,问题得到解决;能正常获取到转为json格式的数据;
jar包分享如下:
链接:https://pan.baidu.com/s/1kPCpvh2DIMHpm0g6g5pk1Q
提取码:zvuv