Idea中tomcat(ssm整合)启动项目:ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

Idea中tomcat(ssm整合)启动项目:ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

背景描述

在IDEA中部署tomcat,log出现ClassNotFoundException:org.springframework.web.context.ContextLoaderListener,但是使用maven,run插件的方式可以启动,也能测试成功

错误原因

资源在IDEA中看见已导入,但是部署时tomcat未成功将资源导入,正确的是如下图的目录结构
Idea中tomcat(ssm整合)启动项目:ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

解决方案如下图:

Idea中tomcat(ssm整合)启动项目:ClassNotFoundException:org.springframework.web.context.ContextLoaderListener