使用IDEA搭建SpringMVC项目,配置好Tomcat直接运行时,报了一个错
ClassNotFoundException: org.springframework.web.context.ContextLoaderListener ,
实际检查依赖的jar是包含该类的
实际原因是,在项目output中没有包含所需的依赖
处理:
File-Project Structure-Artifacts
会发现在Available Elements目录下有一些包没有拷贝到左侧的output目录,
右键Available Element,然后选择Put into xxx就可以了