在idea中配置好maven,并且配置好tomcat后,运行时报出如下错误:
在这里插入图片描述
关键错误如下:

 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

并且弹出的网页窗口报错500:
在这里插入图片描述
网上搜索了一下,找了各种各样的答案都没有用,搞了一晚上,通过与正确的项目案例对比后才发现问题所在,真正的问题在于导入的包的版本不对:
在这里插入图片描述
将版本号修改成“${spring-version}”就可以了:
在这里插入图片描述


版权声明:本文为qq_16877055原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_16877055/article/details/90300605