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未成功将资源导入,正确的是如下图的目录结构
在这里插入图片描述

解决方案如下图:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43231352/article/details/83037190