IDEA开发工启动Tomcat ContextLoaderListener异常ClassNotFoundException处理

ClassNotFoundException处理

使用IDEA搭建SpringMVC项目,配置好Tomcat直接运行时,报了一个错 ClassNotFoundException: org.springframework.web.context.ContextLoaderListener, 实际检查依赖的jar是包含该类的

原因是,在项目output中没有包含所需的依赖
处理:
File -> Project Structure -> Artifacts
会发现在Available Elements目录下有一些包没有拷贝到左侧的output目录, 右键Available Element,然后选择Put into xxx就可以了

在这里插入图片描述

posted @ 2020-02-16 11:35  张还行  阅读(315)  评论(0编辑  收藏  举报